HwGUI 2.20: справочное руководство  
назад Александр С. Кресин, Сентябрь 2016  


7. Утилиты
7.1. Дизайнер

The Designer is intended to create/modify input screen forms and reports. It's main features are:

Few notes for HwGUI applications about using of some properties and methods:

Few notes about the reports builder. For a few years there was another report designer in HwGUI - HwReport. Now the Designer becomes the main report builder utility. It has more modern and advanced engine than Hwreport and, what is important, it is more easy to support one engine than two different :). The important point is that now the report builder may be integrated into the application and it is convenient, IMO, that the same code, the same module, linked into the application, implements two tasks - works with input forms and with reports. The compatibility with the *.rpt files, created with Hwreport, is implemented via the plugin ( resource/r_text.prg ) - you may open rpt files, choosing the 'plain text format' and then save them in a new format, which is exactly the same as for input forms. The new report engine uses a bit different approach than the old one. There are no 'markers' - the widget 'area' is used instead. You can convert any rpt file into the new format and you will see how these 'areas' are used. The 'area' has two main properties:

The areas may be nested - to implement subtables, for example. The report itself has two methods: Every print item ( Label, Box, Vline, HLine, Bitmap ) has three methods: The 'Label' item has additionally a method 'Expression', which calculates a string, which should be printed. The 'area' has additionally a method 'onNextLine', which is executed for the each line in a 'Table' area - it is the same as script for the 'End Line' marker in an old report engine.


7.2. Tutorial


7.3. Отладчик


7.4. Текстовый редактор


7.5. Dbc


7.6. Менеджер бинарного контейнера


8. Contrib (Дополнительные модули)


8.1. ActiveX


8.2. Qhtm
8.2.1. Overview

QHTM is a C++ library, which allows to display and print HTML content in your application - on any window, device context, on a report, on a button or in a tooltip. For more details look at http://www.gipsysoft.com. HwGUI provides an interface for this library. To use it, you need to download QHTM from the http://www.gipsysoft.com/qhtm/freedownload.shtml and copy qhtm.dll to the same directory, where your application is.
Attention !!! QHTM is released under other license than Harbour and HwGUI, so don't forget to read it before using !


8.2.2. Commands
   @ <x>,<y> QHTM [ <oQhtm> ]
            [ CAPTION  <caption> ] 
            [ FILE  <fname> ] 
            [ RESOURCE  <resname> ] 
   	 [ OF <oWnd> ]; 
   	 [ ID <nId> ] 
   	 [ SIZE <width>, <height> ] 
   	 [ ON INIT <bInit> ] 
   	 [ ON SIZE <bSize> ] 
   	 [ ON CLICK <bLink> ] 
   	 [ ON SUBMIT <bSubmit> ] 
   	 [ STYLE <nStyle> ]
   

This command creates QHTM control. Html content may be assigned in three ways:

ON CLICK clause determines the codeblock, which will be executed when user clicks on an external link. ON SUBMIT clause determines the codeblock, which will be executed when user submits form.

   REDEFINE QHTM [ <oQhtm> ]
            [ CAPTION  <caption> ] 
            [ FILE  <fname> ] 
            [ RESOURCE  <resname> ] 
   	 [ OF <oWnd> ]; 
   	 ID <nId> 
   	 [ ON INIT <bInit> ] 
   	 [ ON SIZE <bSize> ] 
   	 [ ON CLICK <bLink> ] 
   	 [ ON SUBMIT <bSubmit> ]
   

This command redefines QHTM control from resources. Html content may be assigned in three ways the same three ways as in @ ... QHTM command.

   @ <x>,<y> QHTMBUTTON [ <oButton> CAPTION ] <caption>
   	 [ OF <oWnd> ]; 
   	 [ ID <nId> ] 
   	 [ SIZE <width>, <height> ] 
   	 [ ON INIT <bInit> ] 
   	 [ ON SIZE <bSize> ] 
   	 [ ON CLICK <bClick> ] 
   	 [ STYLE <nStyle> ] 
   	 [ FONT <oFont> ] 
   	 [ TOOLTIP <ctoolt> ]
   

This command works exactly as @ ... BUTTON, but <caption> may include html content.

   REDEFINE QHTMBUTTON <oButton>
   	 [ OF <oWnd> ] 
   	 ID <nId> 
   	 [ ON INIT <bInit> ] 
   	 [ ON SIZE <bSize> ] 
   	 [ ON CLICK <bClick> ] 
   	 [ FONT <oFont> ] 
   	 [ TOOLTIP <ctoolt> ]
   

This command works exactly as REDEFINE BUTTON, but <caption> may include html content.


8.2.3. Functions

QHTM_Init( [ cDllName ] )

QHTM_Message( cMessage [,cTitle ] [,nFlags ] )

QHTM_LoadFile( handle, cFileName )

QHTM_LoadRes( handle, cResourceName )

QHTM_AddHtml( handle, cText )

QHTM_GetTitle( handle )

QHTM_GetSize( handle )

QHTM_EnableCooltips()

QHTM_PrintCreateContext() --> hContext

QHTM_PrintSetText( hContext,cHtmlText )

QHTM_PrintSetTextFile( hContext,cFileName )

QHTM_PrintSetTextResource( hContext,cResourceName )

QHTM_PrintLayOut( hDC,hContext ) --> nNumberOfPages

QHTM_PrintPage( hDC,hContext,nPage )

QHTM_PrintDestroyContext( hContext )


9. Лицензия

HwGUI выпущен под той же лицензией, как и сам Harbour.

Эта программа является свободным программным обеспечением; вы можете распространять и/или изменять ее в соответствии с условиями Открытого лицензионного соглашения GNU, опубликованного Фондом свободного программного обеспечения; либо версии 2, либо любой более поздней версии по вашему выбору.

эта программа распространяется в надежде, что она будет полезной, но БЕЗ ЛЮБОЙ ГАРАНТИИ... Тьфу! Надоело переводить всю эту юридическую бредятину.

Смысл в том, что лицензия - GNU GPL, но с тем исключением, что если вы подключите HwGUI к другим файлам для получения исполняемого файла, это само по себе не вызовет того, что полученнный исполняемый файл тоже будет подчиняться, или, как еще говорят, будет инфицирован GNU GPL. Использование этого исполняемого файла не ограничено тем, что HwGUI входит в его состав.