Saturday, March 28, 2009

What is HWGUI ?

From : http://kresin.belgorod.su/hwgdoc.html HwGUI 2.16 reference manual by Alexander S.Kresin, Sept 2006


1.1. What is HwGUI

HwGUI is an add-on library for Harbour and xHarbour, intended for creating GUI applications. There are two versions of HwGUI - Win32 version, which is based on direct calls of Win32 API, and GTK version, which uses GTK2 library and can be used under any platform where GTK is implemented ( Linux, Windows, probably MacOS ). While developing HwGUI I tried to hide from the end user - Harbour programmer technical details of API calls and to build a set of commands and functions, which could allow easily create and manage GUI objects.


1.2. History of HwGUI


I began to work on HwGUI in August 2001 and the first version was released on August 21. My initial intention was to create a small and fast GUI lib mainly for my own needs. And already in October I had wrote the first small application with HwGUI for my firm, it reads the databases, created and managed with the accounting system, generates some documents and sends them by fax.

Firstly, from the initial release and til the 1.3 HwGUI didn't use the OOP paradigm - and I even had declared this as one of HwGUI features. My main motivations was speed and stability. Harbour's implementation of classes at that time had some bugs and I didn't want to add problems to myself. And, of course, access to object's variables is more slow than access to the array items. OOP is an additional level and using of it reduces application's performance.


But later I have arrived at a decision to make HwGUI OOP based - to simplify user interface and make it better structured and more convenient. So starting from the release 2.0 HwGUI is based on OOP paradigm.

Since the autumn'2003 HwGUI is hosted by SourceForge, and there is a group of developers working on it. Thanks to all of them for participation and contributions.

Yet another important milestone in HwGUI's timeline is a December,2005 - where a development of GTK version has been started, so HwGUI became a cross-platform tool.

Wednesday, March 25, 2009

What is Clip ?

CCH :
Just extracted this information from the Guestbook entry by Daniel Pascuel...


Preprocessor.
Fully compatible with CA-Clipper with some new possibilities.

Compiler.
slight incompability with CA-Clipper, which may be resolved easily, using the "search and replace" method. In addition it can compile to C program, byte-code, dynamic library and mixed C+byte-code.

Very fast and efficient OO-model.

Difference from CA-Clipper reveals itself in part of descriptions and making an object, but in part of using the ready objects syntax and logic of functioning is completely the same.
It is possible to write programs on CLIP, without using other syntax excepting OOP.
Initial support syntax from FS,CAVO,FoxPro.
C-API. has much more possibilities than CA-Clipper.

Full international support .
Including adjustment on any code page of any language on any keyboard (with stelnet emulator only or on consoles), substitution of string constants during execution and changing a logic of functioning with strings, given for functions alpha, digit, lower, upper, subscripted weight factors etc. Support two-bytes charsets BIG5, GB, may be Korean, Japan too.

GUI, based on GTK.
Provides using of all widgets and processing the events

Using of dynamic libraries, loading and execution of the byte-code from external files ( in run-time, too ).

Compatibility.
up to Clipper 5.3 (support of objects menu, button, check and other get-objects), as well as standard classes tbrowse,get,error.

Are implemented a lot of CA_Tools functions, including all functions for processing the lines, dates, files, mathematicians.

support all SIX functions and features

MEM,DBF,DBT,FPT,NTX,CTX,CDX,NSX...

VFP data types; datetime,currency

RDD allows to use your own drivers, as well as use a driver, combined from several different drivers.

RDD also allows to use only OO-style, without using of aliases

Multitask support.
Builtin simple non-preemptive multitask model

CODB - CLIP Object Data Base.
Library and utils for object storehouse

SQL.
libraries and classes for direct access to SQL-servers (PG,MySql,Oracle,Interbase)
ODBC and ODBC bridge to Windows drivers.
SQL-interpreter and commands, compatible with FoxPro
Other possibilities .

Overloading operators for objects.

Support of regular expressions.

function for TCP/IP sockets connections

COM_() functions

Rushmore like technology, but more fast and efficient.

Support of very-large-scale numbers with unlimited accuracy.

Support of graphic files PNG,GD,JPEG and primitives like lines, rectangles, firing ranges, circumferences etc.

Several common classes for word processorses, html/cgi programms.

Several utilities for interpreting the patterns of the documents, www_sql,clip_bl, clip_blank, clip_sql, clip_hindex, clip_hseek etc.

multiwindows interactive debugger.

Supported OS’es.
Linux, FreeBSD, OpenBSD, SPARC & x86 Solaris, IBM mainframe with TurboLinux, Win32 ( with CYGWIN development tools)

AND IS FREE !!!!!


Home Page
www.itk.ru/english/index.shtml

Download
sourceforge.net/project/showfiles.php?group_id=170673&package_id=194873&release_id=461153

Saturday, March 21, 2009

HMG: Grid versus Browse [Updated 25th March 2009]

CCH :
According to the MiniGUI Help File, a Browse control is a general purpose database browser.
while a control Grid is a container object that displays data in rows and columns, and is similar in appearance to a Browse window.

Q1. So, what are the differences ?

Q2. When to use BROWSE ?

Q3. When to use GRID ?

Sudip :

Q4. For browse control (for data editing), do we need to use table "EXCLUSIVELY" ?


Answers

1. Rathinagiri (HMG Forum) :

1.1 Browse controls are always linked with one table (that too a .dbf table).

1.2 Grid controls are for used for other purposes where, you wish to represent data in row,col format. For example, it may show a two dimensional array!

1.3 All the browse controls are grid controls but not vice versa.

2. MOL aka Malek, Poland (HMG Forum)

2.1 I think you will have problems with browsing huge tables (exhausting memory, etc) while using grid. Using Browse, I didn't found problems with database which has 100MB.

2.2 You need to open table in exclusive mode only when you want to add records or edit record via ALT-A, ALT-E.

2.3 If you open table in shared mode, you must write your own function to add, edit or delete rows.

2.4 WORKAREA property of Browse is available at control definition only.


3. Sudip, Kolkata, West Bengal India

3. 1 I just found a big difference in Grid and Browse in MiniGUI extended!
If you use SET AUTOADJUST ON. Then Grid will be auto adjusted, but normal Browse (not tsbrowse) will not! :)

3.2 As per help file (hmg_hlp.chm), we can set WORKAREA during definition of browse only! Cannot change on the fly!

3. Bicahi Esgici, HMG Forum, Turkey

Hi to all Clipper and especially HMG fans

I want give a humble answer to an unanswered question in Saturday, March 21, 2009 post HMG; Grid versus Browse;

Sudip ;

Q4. For browse control (for data editing), do we need to use table "EXCLUSIVELY" ?

A4. No. If your application will run in a single machine this doesn’t matter. In a network environment you can’t open your files exclusively. If so, only one user (who come first) can use your application. Than, you MUST use SHARED mode. BTW you don’t need specify SHARED mode option every open (USE); setting globally EXCLUSIVE OFF is sufficient.

When a file open by shared, editing need some considerations. Under Browse or not, you have LOCK every record before and UNLOCK after edit ( changing record pointer also issue an UNLOCK). LOCK ( .T.) property of BROWSE successfully achieve this duty for you.

While a BROWSE active, ALT-A allow row appending to table. This is only issued an APPEND BLANK command. This command automatically LOCK new appended (empty) record. So, doesn’t require any precaution.

Precaution required for operations intended multiple records, such as PACK, ZAP, APPEND FROM, DELETE FOR ... / ALL, RECALL FOR ... / ALL, REPLACE FOR ... / ALL, UPDATE ON ...

The best way for such operations is "close" application to network ( all user ) and performing on a single machine. Another way is using FLOCK() for a limited time.

I hope that this answer will be useful.

Regards and happy HMG’ing

Tuesday, March 17, 2009

Programming MDI with MiniGUI - Part II [Updated 22nd march 2009]

After tinkering with MDI programming and with the help of Grigory of HMG Extended Forum :-






Basic syntax for a Browse which works perfectly in a non-MDI environment is as follows :-

[ @ , ] BROWSE
[ ID ]
[ OF | PARENT | DIALOG ]
WIDTH
HEIGHT
HEADERS
WIDTHS
WORKAREA
FIELDS
[ VALUE ]
[ FONT SIZE ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP ]
[ BACKCOLOR ]
[ DYNAMICBACKCOLOR ]
[ DYNAMICFORECOLOR ]
[ FONTCOLOR ]
[ ON GOTFOCUS | ]
[ ON CHANGE | ]
[ ON LOSTFOCUS | ]
[ [ ON DBLCLICK | ] | [ EDIT | ALLOWEDIT [ INPLACE ] ] [ APPEND | ALLOWAPPEND] ]
[ ON HEADCLICK | ]
[ WHEN ]
[ VALID ]
[ VALIDMESSAGES ]
[ READONLY ]
[ LOCK ]
[ DELETE ]
[ NOLINES ]
[ IMAGE ]
[ JUSTIFY ]
[ NOVSCROLL ]
[ HELPID ]
[ BREAK ]

However, please note that for MDI environment:-

[ [ ON DBLCLICK | ] | [ EDIT | ALLOWEDIT [ INPLACE ] ] [ APPEND | ALLOWAPPEND] ]

a) EDIT/APPEND does not work
b) You may use EDIT INPLACE

This is exactly why I wrote my own UDF to replace them :-)

Update on 23rd March 2009

Finally, perfected (with the help of Grigory of HarbourMiniGUI Forum) TILING/CASCADE of Child Windows populated with different DBF

Mel Smith : From CA-Clipper to xHarbour+HMG

CCH: On reading a email from Sudip regarding Mel Smith's migration from CA-Clipper to xHarbourt+HMG, I wrote to Mel Smith on 16th March 2009 and obtained his consent to republish it here.

Mel Smith to Sudip

Sudip,

Many people are starting to use the 'IDE' method (and, apparently successfully).

However, I am 'old-fashioned' and so I hand-code everything, and I use the 'HBMAKE.EXE' utility of xHarbour to build my apps.

If you provide me with an email address that allows attachments (btw, Gmail does *not* allow attachments), I will forward my BLD.BAT file, my xxx.BC file that is a parameter to HBMAKE, and my main app plus one other module for you to see how I proceed.

My conversion procedure is usually:

1. Make a copy of the original Clipper 5.2e program and all its various modules
2. Convert this copy to proper xHarbour (fixing all previous bad styles to proper styling, etc, etc)
3. With all modules converted to xHarbour, run this console-style program to ensure it works as good or better than the Clipper app
4. Start windowizing:
a. Start with the Function Main() and build a main window.
b. Add the main menu to this window
c. In one of the menu options, call/activate a simple sub-function (e.g., build all indexes)
d. Go to this sub function and add a child window and carry on with the conversion.
e. Go to c. again :)))

I have included the Main Window definition from the Main Function from one of my apps below:


... there are 1480 lines of setup before the following initialization of the app's Main Window ...

BTW, I had an old app named ACT (for Accounting -- I always use 3 letters for my various apps)
When I started converting to 'windows' I just added a 'W' to the beginning of 'ACT' . Thus, WACT is the app name
Please don't assume the code below is 'Good' or 'Sophisticated'. It is *not* ! It is just *my* conversion of old stuff. But it does work., and it is quite simple. There are about 48 separated modules I had to convert. The fragment below is part of the Main module

You will note that some of the conversion has not been required or completed yet (i.e., the donothing() function refers to this

...
...
SET MULTIPLE OFF

SET NAVIGATION EXTENDED
cWIN := "WACT"

DEFINE WINDOW WACT ;
AT nMTOP,nMLEFT ;
WIDTH nMWIDTH HEIGHT nMHEIGHT ;
TITLE "Accounting Control for A/P, A/R and Payroll: " + GVERSION + ;
" ( on Drive " + GNETDRV+" )" + " Process Date : " + GTHEN ;
ICON "WORLD" ;
FONT "Arial" SIZE 12 ;
MAIN ;
ON INIT {|| (IIF(lRBLDIDX,(WACT.LABNDX.SHOW,WACT.NDXFIL.SHOW, ;
WACT.INDEXPROG.SHOW,RBLDIDX(lSETUPDBF:=.T.)),), ;
WACT.LABNDX.HIDE,WACT.NDXFIL.HIDE,WACT.INDEXPROG.HIDE, ;
(GABORT := .NOT. SETUPDATES(GDATE), ;
IIF(GABORT,DOMETHOD("WACT","RELEASE"),.T.)), ;
SETSTATUS(cWINSTATUS:=" Ready for Menu Selection"))}

DEFINE MAIN MENU
POPUP "Accounts &Payable"
ITEM " 1. Add/Edit A/P Transactions" ACTION {||MNTPAY(),DBCLOSEALL()}
ITEM " 2. Add/Edit C/R Transactions" ACTION DONOTHING() DISABLED
ITEM " 3. Load Suppliers" ACTION DONOTHING() DISABLED
ITEM " 4. Update Supplier A/P File" ACTION DONOTHING() DISABLED
ITEM " 5. Update Purchase Order File" ACTION {||MNTPCH(),DBCLOSEALL()}
ITEM " 6. Fix Vend Acct. Nos. in A/P" ACTION DONOTHING() DISABLED
ITEM " 7. P.O Report Menu" ACTION DONOTHING() DISABLED
ITEM " 8. A/P Reports / Cheques Menu" ACTION {||PAYREPS(),DBCLOSEALL()}
ITEM " 9. C/R Reports / Cheques Menu" ACTION DONOTHING() DISABLED
ITEM " A. Multi-Job Costing Tables" ACTION {|| LOADCOST("WACT"),DBCLOSEALL(), ;
SETPROPERTY("WACT","oSTOPSCAN","VISIBLE",.F.), ;
SETPROPERTY("WACT","oSTOPSCAN","ENABLED",.F.)}
ITEM " B. Job Costing for ONE Job" ACTION {||MNTJCS(),DBCLOSEALL()}
ITEM " X. Exit" ACTION DOMETHOD("WACT","Release")
END POPUP

POPUP "Accounts &Receivable"
ITEM " 1. Add/Edit A/R Transactions" ACTION DONOTHING() DISABLED
ITEM " 2. Fix Cust No. in A/R File " ACTION DONOTHING() DISABLED
ITEM " 3. Edit Customer Information" ACTION DONOTHING() DISABLED
ITEM " 4. Edit Customer Financials " ACTION DONOTHING() DISABLED
ITEM " 5. " ACTION DONOTHING() DISABLED
ITEM " 6. Receipts Input Processing" ACTION DONOTHING() DISABLED
ITEM " 7. " ACTION DONOTHING() DISABLED
ITEM " 8. Print Reports / Invoices " ACTION DONOTHING() DISABLED
ITEM " 9. " ACTION DONOTHING() DISABLED
ITEM " A. Change Txn Number Format " ACTION DONOTHING() DISABLED
ITEM " B. Import Spreadsheet Data " ACTION DONOTHING() DISABLED
END POPUP

POPUP "&Utilities"
ITEM " 1. View/Edit G/L Master " ACTION DONOTHING() DISABLED
ITEM " 2. View Admin Passwords " ACTION DONOTHING() DISABLED
ITEM " 3. Load C/R Register File" ACTION DONOTHING() DISABLED
ITEM " 4. Load G/L Accounts File" ACTION DONOTHING() DISABLED
ITEM " 5. Load Time-Sheet Files " ACTION DONOTHING() DISABLED
ITEM " 6. Load Employee File " ACTION DONOTHING() DISABLED
ITEM " 7. Re-Build Vendor Codes " ACTION DONOTHING() DISABLED
ITEM " 8. Set-Up P.O. Remarks " ACTION DONOTHING() DISABLED
ITEM " 9. Set-Up Div/EWO DBFs " ACTION DONOTHING() DISABLED
ITEM " A. Set-Up Work-Area DBFs " ACTION DONOTHING() DISABLED
END POPUP

POPUP "&Employees"
ITEM " 1. Browse Employee File " ACTION DONOTHING() DISABLED
ITEM " 2. Browse Job Desc File " ACTION DONOTHING() DISABLED
ITEM " 3. Browse Rates/Deductions " ACTION DONOTHING() DISABLED
ITEM " 4. Time-Sheet Entry System " ACTION {||MNTTBS(),DBCLOSEALL()}
ITEM " 5. Print Time and Expenses " ACTION {||TBSREPS(),DBCLOSEALL()}
ITEM " 6. Print Payroll Cheques " ACTION DONOTHING() DISABLED
ITEM " 7. Period-End Payroll " ACTION DONOTHING() DISABLED
ITEM " 8. Load Employees (AccPac) " ACTION DONOTHING() DISABLED
ITEM " 9. View TBS Time-Sheets " ACTION DONOTHING() DISABLED
ITEM " A. Browse Unions File " ACTION DONOTHING() DISABLED
END POPUP

POPUP "&Manager"
ITEM " 1. Rebuild Index Files" ACTION RBLDIDX(lSETUPDBF:=.T.)
ITEM " 2. Edit Company Information" ACTION {|| MNTSYS(),DBCLOSEALL()}
ITEM " 3. Run old DOS ACT System" ACTION DOOLDACT("WACT")
ITEM " 4. View / Edit Job Status" ACTION {|| MNTJOB("WACT"),DBCLOSEALL()}
ITEM " 5. View / Edit Job Rates" ACTION {|| MNTJRT(),DBCLOSEALL()}
ITEM " 6. Print Job(s) Status" ACTION DONOTHING() DISABLED
ITEM " 7. Test Send of Email" ACTION SENDMAIL()
ITEM " X. Exit" ACTION DOMETHOD("WACT","Release")
END POPUP

END MENU

@ (nMBOT-nMTOP)/2 - 40, 150 LABEL LABNDX AUTOSIZE ;
VALUE "Indexing File : " ;
INVISIBLE

cFIL2NDX := SPACE(20)

@ (nMBOT-nMTOP)/2 - 40, 300 TEXTBOX NDXFIL VALUE cFIL2NDX ;
WIDTH 300 ;
INVISIBLE

@ (nMBOT-nMTOP)/2,150 PROGRESSBAR INDEXPROG ;
RANGE 0,10000 ;
WIDTH 600 ;
HEIGHT 30 ;
SMOOTH ;
INVISIBLE ;
TOOLTIP "Indexing Progress"


@ nMBOT-86,000 LABEL STATPMPT OF WACT AUTOSIZE ;
VALUE "Status Line->" ;
FONT "Arial" SIZE 10

@ nMBOT-86,100 LABEL STATLINE OF WACT ;
VALUE cWINSTATUS ;
WIDTH 500 HEIGHT 30 ;
FONT "Arial" SIZE 10 ;
BOLD

@ nMCTRROW-(nBUTTH),nMCTRCOL-(nBUTTH) BUTTONEX oSTOPSCAN OF WACT;
CAPTION "Stop Scan"+CRLF+"of Job Cost"+CRLF+"Databases" ;
WIDTH nBUTTW+30 ;
HEIGHT nBUTTH+40 ;
FONTCOLOR RED ;
BACKCOLOR YELLOW ;
NOTABSTOP ;
BOLD ;
INVISIBLE ;
ACTION {||lESCPRESSED := .T.}

WACT.oSTOPSCAN.ENABLED := .F.
WACT.oSTOPSCAN.VISIBLE := .F.

ON KEY ESCAPE OF WACT ACTION {||nESCKEY:=K_ESC,THISWINDOW.RELEASE}

END WINDOW

Mel Smith

Monday, March 16, 2009

What is Xailer ?

CCH: I first heard of Xailer when I returned to comp.lang.clipper after a 12-year hiatus. I did download it and found it to be interesting and familiar given my Delphi background. I posted a basic question on comp.lang.clipper which was not answered. Since I could not even get started, I moved on.

However, the latest Poll on this blog clearly shows that perhaps Xailer (though a commercial product) may be a force to be reckoned with...

From http://xailer.com

Xailer is a complete 32 bits visual development environment for Xbase users, following the guide lines of other already existing programming environments (Delphi, Visual Basic,...). As any other complete visual environment includes:

* Form designer
* Professional Source code editor
* Property inspector
* Project manager
* Report generator
* Resource manager
* Integrated Debugger

And all these features are built over a unique interface, which is tremendously intuitive and permits the development of any project in record time.

However, Xailer still permits the use of the traditional programming approach that the Xbase programmers have been used to, which consist of the use of a personal programming editor, a 'Make' tool for the compiling and linking process, and of course, the possibility of designing the forms directly from source code with friendly commands like @ row, column. Besides, both systems (IDE and traditional) can be mixed without problem on the same project, so the flexibility is absolute.

We even have a tool, XEdit, a professional code editor and project manager completely written in Xailer. It includes neither the form designer nor the Resource Manager available in the IDE but will let you to program with Xailer in the classical way if you prefer.

However we believe that even in the short term the user will surely go for the visual environment due to the following reasons:

* Easiness and speed on form creation
* Complete access to the whole project
* It does not require the use of any external 'Make' tool
* It does not require the use of any external Resource manager tool
* Visual form designer
* Perfect conjunction of components and their properties in an unique module. That is, it completely removes the need of an external tool like 'Resource Workshop' and then establishes the property values of every component on the source code. The assignment of every component property will be done directly from the IDE, and there will be no reference to those assigned properties on the source code created by the user.

Xailer has been created not only to be a migration tool for other Xbase products, but also to be suitable for any user that knows the Xbase programming language or any of its flavors. We believe that is possible to catch the attention of all those Xbase programmers that are already using CA-Clipper, and those that jumped to another environment due it's limitations, such as the absence of an integrated development environment.

Xailer includes everything you need to get started and to create complete management applications, with no need to buy any other tool from a third party. The great advantage of Xailer over all the other development environments is its simplicity for being basically a development tool for management software based on the Xbase standard, although other database systems are also supported, like SQL.


Technical features

Xailer consist of two well defined modules: the GUI library which provides the functions and classes that form the Xailer real engine and the IDE environment (made with Xailer's GUI library) which permits the use of a unique visual interface for the creation of any development project.

Xailer uses the free xHarbour Open Source Compiler for the compilation process and the also free Borland C++ 5.5 compiler. It's planned that in the future we also support other compilers like Harbour and Microsoft MSVC compiler.

Xailer is compatible with all the operating systems of Microsoft starting from Windows 98 and is perfectly adapted to gain the maximum advantage of the new visual themes of Windows XP.

All the compiling and linking complexity is completely hidden to the user, but without losing the flexibility to include personal or third party libraries.

The class library has a tremendously simple and well structured hierarchy which can be adapted to your own needs, with no need to modify the library itself, just using the inheritance mechanism of any OOP system.

The integrated debugger will help you find errors easily, allowing step by step execution, entering or jumping over functions, establishing of break points, inspection of variables and objects, etc etc...

Xailer supports any ActiveX component, OCX controls included, and other third party component as well as components specifically made for Xailer. Xailer creates self-contained executables with no need for external DLL's, including the ActiveX components, OCX and/or DLL which the developer wants to use.

The robustness, reliability and speed are the three pillars on which Xailer flourishes, exceeding the rest of competitors on any of these aspects.

Migration

Xailer hasn't been designed to be a compatible tool with other actual tools, but to become the normal evolution of any Xbase programmer, greatly helping the migration from any tool to Xailer. For that purpose it includes the following features:

* Use of classical commands
* Possibility to use the same linear programming style of Clipper and other GUI libraries
* Conversion tool to convert standard resource dialogs to Xailer native format

The migration of any old project should not be very tedious, but there is no magic tool that automatically achieves that work. The biggest differences from a functional point of view are:

* Absence of conventional dialogs. Those are treated like simple forms with the 'bsDialog' property, that acquire a identical aspect and functionality.
* Absence of the REDEFINE command
* Control creation is done on two stages: New() and Create(), which permits to modify any component property after the object instantiation, but before the control creation.
* Global objects 'Application', 'Screen' and 'Printer'
* Ability to create new events on any control


Language

Xailer is completely designed and developed by Spanish spoken programmers, that is, it is a Spanish product, but it has been written following english conventions and the documentation is done in Spanish and English. The IDE and the GUI library supports up to 8 languages:

* English
* Spanish
* French
* Italian
* German
* Portugues
* Catalan
* Gallego


Who

Xailer is a commercial project lead by José F. Giménez and Ignacio Ortiz de Zúñiga, with the considerable collaboration of José Lalín and Pedro Gil.

Credits also with the backing and collaboration of well known Xbase world programmers.


GTWVG : Update by Pritpal Bedi

Hi Everybody

Here is the ChangeLog entry I committed today, may it interest you anyway;

2009-03-15 16;42 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* harbour/contrib/gtwvg/hbgtwvg.ch
+ #define HB_GTI_SETPOSANDSIZE
+ #define HB_GTI_HB_GTI_REFRESH
+ Two more events to manage new CUI-GUI objects.

+ #define GOBJ_OBJSTATE_*
+ #define GOBJ_OBJDATA_*
+ #define GOBJ_IMAGESOURCE_*
+ Constants to manage CUI=GUI objects.

* harbour/contrib/gtwvg/gtwvg.h
* harbour/contrib/gtwvg/wvggui.h
! Updated to be compilable for WinCE builds.

* harbour/contrib/gtwvg/gtwvg.c
! Updated to honor WinCE builds.
! Implemented double-buffering of console. Now flickering
should be the topic of the past.

* harbour/contrib/gtwvg/wvggui.c
! Updated to honor WinCE builds.

* harbour/contrib/gtwvg/wvgcuig.c
+ Implemented a highly optimized GUI controls for CUI consoles.
Implementation includes auto-destruction, data-substitution,
enable/disable feast, etc. These controls are almost identical
which are available with Wvt_Draw*() namespace but with a
great difference that these are tied to the urrent GT and
are handelled transparently by the GT itself. Developer
has only to define it. The only requirement is that
SaveScreen()/RestScreen() needs to be changed to new
Modal GT window. Appln screens will never get blurred. It
also employs optimized double-buffering and hence almost
eliminates screen flickering.

* harbour/contrib/gtwvg/wvgcore.c
* harbour/contrib/gtwvg/wvgsink.c
* harbour/contrib/gtwvg/wvgutils.c
* harbour/contrib/gtwvg/wvgwin.c
! Updated to honor WinCE builds.

* harbour/contrib/gtwvg/wvgcrt.prg
! A couple of methods fine-tuned.
! Modal GT’s more responsive to user needs.

* harbour/contrib/gtwvg/tests/demowvg.prg
! Demonstrated the latest implemention of CUI-GUI controls. See below.
Please try option in the main menu.
Also note the usage of Modal GT to simulate Alert() in new window.
Every GUI object returns a handle to it which may be used to
change its parameters.

; TOFIX( WINCE BUILDS ) - GetSystemDirectory()


/* IMPLEMENTATION OF CUI-GUI CONTROLS - A CODE PREVIEW



#xTranslate Alert( => MyAlert(

PROCEDURE GCUIConsole( oCrt )
LOCAL dDate ;= date()
LOCAL cName ;= pad( ’Some Usefule Name’ , 35 )
LOCAL cAdd1 ;= pad( ’Linda Goldman Avenue’, 35 )
LOCAL cAdd2 ;= pad( ’Excellent Street’ , 35 )
LOCAL cAdd3 ;= pad( ’Suit #415’ , 35 )
LOCAL nSlry ;= 9000
LOCAL nColGet ;= 8
LOCAL GetList ;= {}
LOCAL cLabel ;= "VOUCH, that GROWS with you"
LOCAL oTab, oStat, hBoxR, hTxt

SET SCOREBOARD OFF

SetColor( "N/W,N/GR*,,,N/W*" )
CLS
hb_gtInfo( HB_GTI_WINTITLE, "WVG Simplified yet Powerful CUI-GUI Console!" )

@ MaxRow(), 0 SAY PadC( "Navigate the Gets", maxcol()+1 ) COLOR "W+/B"

@ 2, nColGet SAY "<>"
@ 5, nColGet SAY "<" + PadC( "Name" , 33 ) + ">"
@ 8, nColGet SAY "<" + PadC( "Address", 33 ) + ">"
@ 15, nColGet SAY "<>"

@ 3, nColGet GET dDate ;
WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 1 ) ) } ;
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,0,0 ) ), .t. }
@ 6, nColGet GET cName ;
WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 2 ) ) } ;
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,255,0 ) ), ;
Wvg_SetGObjState( hBoxR, 3 ), .t. }
@ 9, nColGet GET cAdd1 ;
WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 3 ) ) } ;
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,0,255 ) ), .t. }
@ 11, nColGet GET cAdd2 ;
WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 4 ) ) } ;
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,255,255 ) ), ;
Wvg_SetGObjState( hBoxR, 1 ), .t. }
@ 13, nColGet GET cAdd3 ;
WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 198,21,140 ) ), .t. }
@ 16, nColGet GET nSlry PICTURE "@Z 9999999.99" ;
WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 0,0,0 ) ), .t. }

// The only additional calls to render your console GUI
//
// The GETLIST ; This can be embedded via @ GET preprocessor command
aEval( GetList, {|oGet| Wvg_BoxGet( oGet;Row, oGet;Col, Len( Transform( oGet;VarGet(), oGet;Picture ) ) ) } )
//
hBoxR ;= Wvg_BoxRaised( 1,2,18,49, {-5,-5,5,5} )
//
Wvg_BoxRecessed( 1,2,18,49 )
//
// Wvg_BoxGroup( 2,4,17,47 )
//
Wvg_BoxGroupRaised( 2,4,17,47, {-7,-7,7,7} )
//
hTxt ;= Wvg_TextBox( 3,57,16,75, {10,10,-10,-10}, ’This is first TextBox Line!’, 2, 2 )
//
Wvg_Image( 15,36,16,42, {-3,-3,3,3}, GOBJ_IMAGESOURCE_FILE, ’Vouch1.bmp’ )
//
Wvg_BoxRaised( 15,36,16,42,{-2,-2,2,2} )
//
Wvg_ShadedRect( 1,54,18,79, { -5,-5,5,5 }, 0, {65000,21000,7000,56000}, {255,32255,16000,32500} )
//
Wvg_BoxRaised( 1,54,18,79, {-5,-5,5,5} )

// Instruct GT to Repaint the Screen with GUI elements.
oCrt;refresh()

// Issue the read
READ

Alert( ’How did you like the "Alert" replacement?’, { ’WOW’,’OK’,’OOps’} )

RETURN
/*----------------------------------------------------------------------*/
#xUntranslate alert( =>

FUNCTION MyAlert( cMsg, aOpt )
LOCAL nSel, oCrt

oCrt ;= WvgCrt();New( , , { -1,-1 }, { 9, MaxCol()-6 }, , .t. )
oCrt;lModal ;= .t.
oCrt;icon ;= "dia_excl.ico"
oCrt;create()
oCrt;resizable ;= .t.

SetColor( ’N/W’ )
CLS
hb_gtInfo( HB_GTI_WINTITLE, cMsg )

nSel ;= Alert( cMsg, aOpt )

oCrt;destroy()

RETURN nSel

#xTranslate Alert( => MyAlert(
/*----------------------------------------------------------------------*/
STATIC FUNCTION FetchText( nMode )
LOCAL cText

DO CASE
CASE nMode == 1
cText ;= ’Do you know Harbour is gaining a popularity what Clipper enjoyed at one time! ’
cText += ’Enjoy it.’
CASE nMode == 2
cText ;= ’Do you know Harbour can host pure console, cui+gui console, pure gui consoles applications? ’
cText += ’This demonstration is a proof of that.’
CASE nMode == 3
cText ;= ’Do you know Harbour is a multi-gt, multi-window, multi-thread compiler far superior than others in the market! ’
cText += ’And is FREE.’
CASE nMode == 4
cText ;= ’Enjoy and contribute to the project any way you can. Develop, Debug, Support, and spread a word of mouth!’
ENDCASE

RETURN cText
/*----------------------------------------------------------------------*/
*/

;TODO - Write a comprehensive help to exploit CUI-GUI functionality.
Will do in a few days.


Here is the output;

Welcome to Clipper... Clipper... Clipper


In 1997, then using Delphi 3, I had already created 32-bits Windows applications for HRIS, ERP and CRM. In 2007, using Ruby on Rails, an AJAX powered CRM site running on Apache & MySQL was created and I am now using Visual Studio .Net 2008 to create web-based projects and Delphi 7 for Win32 applications using SQL2005 & DBFCDX.

So, why then am I reviving the Original Clipper... Clipper... Clipper via a Blog as CA-Clipper is a programming language for the DOS world ? Believe it or not, there are still some clients using my mission-critical CA-Clipper applications for DOS installed in the late 80's and up to the mid 90's. This is testimony to CA-Clipper's robustness as a language :-)

With the widespread introduction of Windows 7 64-bits as the standard O/S for new Windows based PCs & Notebooks, CA-Clipper EXE simply will not work and it has become imperative for Clipper programmers to migrate immediately to Harbour to build 32/64 bits EXEs

Since 28th January 2009, this blog has been read by 134,389 (10/3/11 - 39,277) unique visitors (of which 45,151 (10/3/11 - 13,929) are returning visitors) from 103 countries and 1,574 cities & towns in Europe (37; 764 cities), North America (3; 373 cities) , Central America & Caribeans (6; 13 cities), South America(10; 226 cities), Africa & Middle-East (12; 44 cities) , Asia-Pacific (21; 175 cities). So, obviously Clipper is Alive & Well : -)


TIA & Enjoy ! (10th October 2012, 11:05; 13th November 2015)


Original Welcome Page for Clipper... Clipper... Clipper

This is the original Welcome Page for Clipper... Clipper... Clipper, which I am republishing for historical and sentimental reasons. The only changes that I have made was to fix all the broken links. BTW, the counter from counter.digits.com is still working :-)

Welcome to Chee Chong Hwa's Malaysian WWW web site which is dedicated to Clipperheads throughout the world.

This site started out as a teeny-weeny section of Who the heck is Chee Chong Hwa ? and has graduated into a full blown web site of more than 140 pages (actually hundreds of A4 size pages) ! This is due to its growing popularity and tremendous encouragements from visiting Clipperheads from 100 countries worldwide, from North America, Central America, Caribbean, South America, Europe, Middle-East, Africa and Asia-Pacific. Thanx Clipperheads, you all made this happen !


What is Clipper ?

You may ask, what is this Clipper stuff ? Could Clipper be something to do with sailing as it is the name of a very fast sailing American ship in the 19th century ?

Well, Clipper or to be precise, CA-Clipper is the premier PC-Software development tool for DOS. It was first developed by Nantucket Corporation initially as a compiler for dBase3+ programs. Since then, CA-Clipper has evolved away from its x-base roots with the introduction of lexical scoping & pre-defined objects like TBrowse. As at today, the most stable version ofClipper is 5.2e while the latest version, 5.3a was introduced on 21 May 1996.

As at 11th November, 1996, an unofficial 5.3a fixes file was made available by Jo French. See the About CA-Clipper 5.3a section for more details. BTW, Jo French uploaded the revised 5.3a fixes file on 20th November, 1996.

Latest News

The latest news is that CA has finally released the long-awaited 5.3b patch on 21 May, 1997.

For 5.3b users, you must a take a look at Jo French's comments on unfixed bugs in 5.3b.

BTW, have you used Click ? If you're a serious Clipperprogrammer and need an excellent code formatter, Click is a natural choice. How to get it ? Simple, access Phil Barnett's site via my Cool Clipper Sites.

32-bits Clipper for Windows ?

Have you tried Xbase ++ ? Well, I have and compared to Delphi (my current Windows programming tool of choice), I'm still sticking to Delphi.

Anyway, you should visit the Alaska Home Page. Give it a chance and then draw your own conclusions !.

The Harbour Project

Is this the future of Xbase ? Take a look at at the Harbour Project

You are Visitor # ...

According to counter.digits.com, you are visitor since 3 June 1996.

If you like or dislike what you see on this website, please drop me a line by clicking the email button at the bottom of this page or better still, by filling out the form in my guest book. If you are not sure what to write,click here to take a look at what other Clipperheads have to say.