Anda di halaman 1dari 30

HwGUI manual de referencia para la versin 2.

10
Traducido por Daniel Gonzlez, El Salvador en America Central Dagonzalez@grupo-uno.com http://ar.geocities.com/dgonzalez_sv/mp3.htm Noviembre 13 del 2003

INTRODUCCIN 1.1 Que es HwGUI ? 1.2 Historia de HwGUI

INSTALACIN DE HWGUI 2.1 Paquete HwGUI 2.2 Cmo construir Libreria HwGUI ? 2.3 Cmo construir Ejemplos HwGUI ?

CMO USAR HWGUI ? 3.1 Mi primera aplicacin

COMANDOS 4.1 Comandos para ventanas y manipulacin de dilogos 4.1.1 INIT WINDOW 4.1.2 INIT DIALOG 4.1.3 ACTIVATE WINDOW 4.1.4 ACTIVATE DIALOG 4.1.5 DIALOG ACTIONS OF 4.2 Comandos para el men 4.2.1 MENU 4.2.2 ENDMENU 4.2.3 MENUITEM 4.2.4 SEPARATOR 4.2.5 MENU FROM RESOURCE OF 4.2.6 CONTEXT MENU Comandos para el manejo de controles 4.3.1 ADD STATUS TO 4.3.2 @ <x>,<y> SAY 4.3.3 @ <x>,<y> EDITBOX 4.3.4 REDEFINE EDITBOX 4.3.5 @ <x>,<y> BUTTON 4.3.6 REDEFINE BUTTON 4.3.7 @ <x>,<y> CHECKBOX 4.3.8 REDEFINE CHECKBOX 4.3.9 @ <x>,<y> COMBOBOX 4.3.10 REDEFINE COMBOBOX 4.3.11 @ <x>,<y> RADIOBUTTON 4.3.12 REDEFINE RADIOBUTTON 4.3.13 RADIOGROUP 4.3.14 END RADIOGROUP 4.3.15 @ <x>,<y> PANEL 4.3.16 REDEFINE PANEL 4.3.17 @ <x>,<y> BROWSE 4.3.18 REDEFINE BROWSE 4.3.19 ADD COLUMN 4.3.20 @ <x>,<y> OWNERBUTTON 4.3.21 REDEFINE OWNERBUTTON 4.3.22 @ <x>,<y> GROUPBOX 4.3.23 @ <x>,<y> DATEPICKER

4.3

4.3.24 4.3.25 4.3.26 4.3.27 4.3.28 4.3.29 4.3.30 4.3.31 4.3.32 4.3.33 4.3.34 4.3.35 4.3.36 4.3.37 4.3.38 4.3.39 4.3.40 4.4

@ <x>,<y> UPDOWN @ <x>,<y> TAB BEGIN PAGE END PAGE @ <x>,<y> TREE INSERT NODE SET TIMER @ <x>,<y> BITMAP REDEFINE BITMAP @ <x>,<y> ICON REDEFINE ICON @ <x>,<y> IMAGE REDEFINE IMAGE @ <x>,<y> LINE @ <x>,<y> RICHEDIT @ <x>,<y> SPLITTER @ <x>,<y> GRAPH

Comando Get 4.4.1 @ <x>,<y> GET 4.4.2 REDEFINE GET 4.4.3 @ <x>,<y> GET 4.4.4 REDEFINE GET 4.4.5 @ <x>,<y> GET 4.4.6 REDEFINE GET 4.4.7 GET RADIOGROUP 4.4.8 @ <x>,<y> GET 4.4.9 @ <x>,<y> GET

CHECKBOX CHECKBOX COMBOBOX COMBOBOX DATEPICKER UPDOWN

FUNCIONES 5.1 Dilogos comnes 5.1.1 SelectFont( oFont ) 5.1.2 SelectFile( cDescript,cMask,cInitDir,cTitle ) 5.1.3 SaveFile( cPrompt,cDescript,cMask,cInitDir,cTitle ) 5.1.4 PrintSetup() 5.1.5 hwg_ChooseColor( nColorCurrent ) 5.2 MessageBoxes y dilogos de HwGUI 5.2.1 MsgInfo( cMessage,cTitle ) 5.2.2 MsgStop( cMessage,cTitle ) 5.2.3 MsgOkCancel( cMessage,cTitle ) 5.2.4 MsgYesNo( cMessage,cTitle ) 5.2.5 MsgBeep( nSound ) 5.2.6 MsgGet( cTitle, cText, nStyle, x, y, nDlgStyle ) 5.2.7 WChoice( arr, cTitle, nLeft, nTop, oFont, clrT, clrB, clrTSel, clrBSel ) Funciones de dibujo.

5.3

CLASES 6.1 6.2 6.3

Jerarqua de la clase HObject HCustomWindow 6.3.1 HWindow 6.3.2 HDialog 6.3.3 HControl 6.3.3.1 HBrowse 6.3.3.2 HPanel 6.3.3.3 HOwnerButton 6.3.3.4 HSplitter 6.3.3.5 HStatus 6.3.3.6 HStatic 6.3.3.7 HButton 6.3.3.8 HEdit 6.3.3.9 HChecBox 6.3.3.10 HRadioButton 6.3.3.11 HCombobox 6.3.3.12 HGroup 6.3.3.13 HLine 6.3.3.14 HSayImage 6.3.3.14.1 HSayBmp 6.3.3.14.2 HSayIcon 6.3.3.14.3 HSayFImage 6.3.3.15 HDatePicker 6.3.3.16 HUpDown 6.3.3.17 HTab 6.3.3.18 HTree

6.5 6.6 6.7 6.8 6.9 6.10 6.11 6.12 6.13 6.14 6.15 7

HColumn HRadioGroup HFont HPen HBrush HBitmap HIcon HPrinter HTreeNode HTimer HFreeImage

INTEGRACIN DE QHTM 7.1 Descripcin 7.2 Comandos 7.3 Funciones LICENCIA SOBRE EL AUTOR

8 9

INTRODUCIN

1.1 Que es HwGUI ? HwGui es una biblioteca adicional para Harbour, prevista para crear aplicaciones en la plataforma Win32. Esta se basa en las llamadas directas del API Win32. Mientras desarrollaba HwGUI intent ocultar al usuario - programador de Harbourlos detalles tcnicos de las llamadas del API y construir un sistema de comandos y funciones que podran permitir crear y manejar objetos GUI. 1.2 Historia de HwGUI Empec a trabajar en agosto 2001 y la primera versin sali el 21 del mismo mes. Mi intencin inicial era crear una librera pequea y rpida principalmente para mis propias necesidades. En octubre ya haba escrito mi primera aplicacin con HwGUI para mi empresa, donde leo bases de datos, creo y manejo sistema de contabilidad, genera algunos documentos y los enva por Fax. Antes que nada, la liberacin inicial de la versin 1.3 no utiliz el paradigma de OOP - y ya haba declarado esto como uno de caractersticas de HwGUI. Mis motivos principales eran velocidad y estabilidad. La implementacin de Harbour a las clases tuvo en aquel momento algunos Bugs y no quise meterme a esos los. Y, por supuesto, el acceso a variables de objeto era ms lento que acezar a elementos de un Array. OOP era un nivel adicional y el uso de l reduca el desempeo de la aplicacin. Pero ms tarde tome la decisin de hacer HwGUI OOP, basado en simplificar las interfaces del usuario y hacerlo bien estructurado y ms conveniente. As se libero la versin 2.0 usando clases.

INSTALACIN DE HWGUI

2.1 Paquete HwGUI HwGUI se distribuye empaquetado Zip. El Zip contiene los siguientes archivos : make_b32.bat makefile.bc make_vc.bat makefile.vc license.txt install.txt whatsnew.txt DOC - Folder INCLUDE - Folder LIB - Folder OBJ SAMPLES - Folder SOURCE - Folder

documentacin archivos cabeceras ibreras ejemplos fuentes

2.2 Cmo construir Librera para HwGUI ? Antes de construir la Librera tienes que verificar el valor ambiente HRB_DIR en el archivo makefile.bc Debes apuntar donde tienes instalado Harbour. Entonces corra make_b32.bat - y esto construir dos Libreras - hwgui. lib y procmisc. lib. Eso es todo! 2.3 Cmo construir Ejemplos HwGUI ?

CMO USAR HWGUI ? 3.1 Mi primera aplicacin HwGUI

#include "windows.ch" #include "guilib.ch" Function Main() Local oMainWnd, oFont Local aCombo := {"Primero","Segundo" } PREPARE FONT INIT WINDOW FONT ON EXIT oFont NAME "MS Sans Serif" WIDTH 0 HEIGHT -13 oMainWnd TITLE "Ejemplo" ; oFont ; { || MsgYesNo("Realmente quieres Salir ?") } EDITBOX "Hola , Mundo!" ; SIZE 200,30 ; STYLE WS_DLGFRAME+ES_LEFT

@ 20,10

@ 270,10 COMBOBOX aCombo ; STYLE WS_TABSTOP ; SIZE 100, 150 ; TOOLTIP "Combobox" @ 120,60 BUTTON "Cierra" ; SIZE 150,30 ; ON CLICK {||EndWindow()} MENU OF oMainWnd MENUITEM "Acerca de" ACTION MsgInfo("Mi Primera Aplicacion en HwGUI") ENDMENU ACTIVATE WINDOW oMainWnd Return Nil

Lo primero que querrs hacer, es crear la ventana principal. Para hacer esto, usa el comando INIT WINDOW. Con esta orden puedes definir la posicin inicial y el tamao de la ventana, el estilo, el icono, el color de fondo. Tambin puedes colocar manipuladores de eventos - codeblocks que son evaluados por otros eventos (INIT, EXIT, PAINT, modificando SIZE, GETFOCUS, LOSTFOCUS y otros). Necesitas definir los controles para esa ventana y el men principal( ENDMENU ) y activar la ventana con ACTIVATE WINDOW Analiza el siguiente ejemplo.
PREPARE FONT oFont NAME "MS Sans Serif" WIDTH 0 HEIGHT -13 MENU...

Al principio, nosotros creamos el objeto oFont para la ventana principal. HwGUI trabaja de tal manera, que si no se define un tipo de letra para un control, este control utiliza el tipo de letra, definido por su ventana padre.
INIT WINDOW oMainWnd MAIN TITLE "Ejemplo" ; FONT oFont ; ON EXIT {||MsgYesNo("Realmente quieres Salir ?")}

Este comando crea la ventana principal con el ttulo "Ejemplo" y con el tipo de letra previamente definido. En la clusula ON EXIT causar la muestra de una caja de mensaje, donde el usuario escoger "YES" para dejar la aplicacin.

@ 20,10

EDITBOX "Hola , Mundo!" ; SIZE 200,30 ; STYLE WS_DLGFRAME+ES_LEFT

@ 270,10 COMBOBOX aCombo ; STYLE WS_TABSTOP ; SIZE 100, 150 ; TOOLTIP "Combobox" @ 120,60 BUTTON "Cierra" ; SIZE 150,30 ; ON CLICK {||EndWindow()}

Los comandos anteriores crean los controles apropiados - Revise, Button. ComboBox se inicializa con el array aCombo, que se declar antes. Button tiene un evento definido - cerrando la aplicacin.
MENU OF oMainWnd MENUITEM "acerca de" ACTION MsgInfo("Mi Primera Aplicacion en HwGUI") ENDMENU

Combobox

y Push

Estos comandos crean el men principal, que incluye el nico artculo "acerca de".
ACTIVATE WINDOW oMainWnd

Este comando activa la ventana principal.

RDENES
4.1 Comandos para ventanas y manipulacin de dilogos
4.1.1 INIT WINDOW

Este comando crea la ventana principal, MDI o MDI CHILD. Para activar la ventana tienes que hacerlo con ACTIVATE WINDOWS o si no con ACTIVATE() que es el mtodo objeto de la ventana.
INIT WINDOW <oWnd> [ MAIN ] [ MDI ] [ MDICHILD ] [ APPNAME <appname> ] [ TITLE <cTitle> ] [ AT <x>, <y> ] [ SIZE <width>, <height> ] [ ICON <ico> ] [ COLOR <clr> ] [ BACKGROUND BITMAP <oBmp>> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ MENU <cMenu> ] [ MENUPOS <nPos> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bPaint> ] [ ON GETFOCUS <bGfocus> ] [ ON LOSTFOCUS <bLfocus> ] [ ON OTHER MESSAGES <bOther> ] [ ON EXIT <bExit> ] MAIN,MDI,MDICHILD clusulas que especifican

el tipo de la ventana, slo uno de

estas se puede usar

en la orden.

cTitle - ttulo de la ventana; x,y,width,height - izquierda y Arriba coordenadas de la ventana, anchura y altura; ico - el nombre del Icono en el archivo de recurso; clr - color del fondo de la ventana; nStyle - estilo de la ventana; oFont - objeto previamente creado de HFont; cMenu - nombre de la declaracin de men en el archivo de recurso (si usted especifica men en recursos); nPos - identifica el men de la ventana usado por controlar las MDI child de windows.

Cuando se crean las ventanas child, la aplicacin agrega sus ttulos al men. El usuario puede activar una ventana child escogiendo su ttulo desde el menu de la ventana bSize bPaint bGFocus bLFocus bExit bOther codeblock, codeblock, codeblock, codeblock, codeblock, codeblock, que se evala al recalibrar ventana; que se evala mientras dibuja la ventana; que se evala cundo obtiene el foco; que se evala cundo pierde el foco; que se evala cundo se cierra; que se evala para todos los otros mensajes usted puede escribir su propio procedimiento para los mensajes que manejan; o con

4.1.2 INIT DIALOG

Crea la caja de dilogo. Para activarlo se hace con el mtodo objeto de la ventana.
INIT DIALOG <oWnd> [ FROM RESOURCE ] [ TITLE <cTitle> ] [ AT <x>, <y> ] [ SIZE <width>, <height> ] [ ICON <ico> ] [ BACKGROUND BITMAP <oBmp> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ CLIPPER ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bPaint> ] [ ON GETFOCUS <bGfocus> ] [ ON LOSTFOCUS <bLfocus> ] [ ON OTHER MESSAGES <bOther> ] [ ON EXIT <bExit> ]

ACTIVATE DIALOG

Activate()

Todas las clusulas tienen el mismo significado igual que el comando INIT WINDOW, hay slo una clusula especfica - FROM RESOURCE - si se usa crea la caja del dilogo del archivo de recurso.
4.1.3 ACTIVATE WINDOW ACTIVATE WINDOW oWnd:Activate().

Es igual a que se procesan en l.

<oWnd> Muestra la ventana y ejecuta los mensajes de salidas

4.1.4

Es igual a y ejecuta los mensajes de salidas que se procesan en l. Por defecto, crea el dilogo modal. Puedes crear dialogos modeless , especificando la clusula de NOMODAL en este comando.

ACTIVATE DIALOG ACTIVATE DIALOG <oDlg> [ NOMODAL ] oDlg:Active(). Muestra el dilogo

4.1.5

DIALOG ACTIONS OF DIALOG ACTIONS OF <oWnd> ON <id1>,<id2> ACTION <b1> [ ON <idn1>,<idn2> ACTION <bn> ]

Este comando es para los usuarios que estn familiarizado con el API de Win32. La ventana consigue mensaje de WM_COMMAND cuando el usuario selecciona una opcin del men, o cuando un control enva un mensaje de notificacin a su ventana padre, o cuando se traduce un golpe de teclado del acelerador. Puedes especificar en este, la fuente del evento y la accin apropiada. id1 ... idn1 es el cdigo de evento, id1 ... idn2 es el identificador del control, b1 ... bn el codeblock.

4.2

Comandos para el men


4.2.1 MENU MENU [ OF <oWnd> ] [ ID <nId> ] [ TITLE <cTitle> ] ENDMENU ENDMENU MENUITEM MENUITEM <item> [ ID <nId> ] ACTION <act> [ ACCELERATOR <flag>, <key> ] [ <lDisabled: DISABLED> ] SEPARATOR SEPARATOR MENU FROM RESOURCE OF MENU FROM RESOURCE OF <oWnd> [ ON <idn> ACTION <bn> ]

4.2.2

4.2.3

4.2.4

4.2.5

ON <id1> ACTION <b1>

Este comando se usa si se especifica el men en el archivo recurso.


4.2.6 CONTEXT MENU CONTEXT MENU <oMenu>

4.3 Comandos para el manejo de controles Todos los comandos siguientes crean los casos de clases, son preprocesados en el mtodo New() o Redefine().
4.3.1 ADD STATUS TO ADD STATUS [ TO <oWnd> ] [ ID <nId> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ PARTS <aparts,...> ]

4.3.2

@ <x>,<y> SAY @ <x>,<y> SAY [ [ [ [ [ [ [ [ [ [ [ [ <oSay> CAPTION ] <caption> OF <oWnd> ]; ID <nId> ] SIZE <width>, <height> ] COLOR <tcolor> ] BACKCOLOR <bcolor> ] ON INIT <bInit> ] ON SIZE <bSize> ] ON PAINT <bDraw> ] STYLE <nStyle> ] FONT <oFont> ] TOOLTIP <ctoolt> ]

4.3.3

@ <x>,<y> EDITBOX @ <x>,<y> EDITBOX [ <oEdit> CAPTION ] <caption> [ OF <oWnd> ]; [ ID <nId> ] [ SIZE <width>, <height> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ ON GETFOCUS <bGfocus> ] [ ON LOSTFOCUS <bLfocus> ] [ STYLE <nStyle> ] [<lnoborder: NOBORDER> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.3.4

REDEFINE EDITBOX REDEFINE EDITBOX <oEdit> [ OF <oWnd> ] ID <nId> [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ ON GETFOCUS <bGfocus> ] [ ON LOSTFOCUS <bLfocus> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.3.5

@ <x>,<y> BUTTON @ <x>,<y> BUTTON [ <oButton> CAPTION ] <caption> [ OF <oWnd> ]; [ ID <nId> ] [ SIZE <width>, <height> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ ON CLICK <bClick> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

2 4.3.6 REDEFINE BUTTON REDEFINE BUTTON <oButton> [ OF <oWnd> ] ID <nId> [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ ON CLICK <bClick> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.3.7

@ <x>,<y> CHECKBOX @ <x>,<y> CHECKBOX [ <oCheck> CAPTION ] <caption> [ OF <oWnd> ]; [ ID <nId> ] [ SIZE <width>, <height> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ INIT <lInit> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.3.8

REDEFINE CHECKBOX REDEFINE [ [ [ [ [ [ [ [ [ CHECKBOX <oCheck> OF <oWnd> ] ID <nId> COLOR <tcolor> ] BACKCOLOR <bcolor> ] INIT <lInit> ] ON INIT <bInit> ] ON SIZE <bSize> ] ON PAINT <bDraw> ] FONT <oFont> ] TOOLTIP <ctoolt> ]

4.3.9

@ <x>,<y> COMBOBOX @ <x>,<y> COMBOBOX [ <oCombo> ITEMS ] <aItems> [ OF <oWnd> ]; [ ID <nId> ] [ SIZE <width>, <height> ] [ INIT <nInit> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ ON CHANGE <bChange> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.3.10 REDEFINE COMBOBOX REDEFINE [ [ [ [ [ [ [ [ COMBOBOX [ <oCombo> ITEMS ] <aItems> OF <oWnd> ] ID <nId> INIT <nInit> ] ON INIT <bInit> ] ON SIZE <bSize> ] ON PAINT <bDraw> ] ON CHANGE <bChange> ] FONT <oFont> ] TOOLTIP <ctoolt> ]

4.3.11 @ <x>,<y> RADIOBUTTON @ <x>,<y> RADIOBUTTON [ <oRadio> CAPTION ] <caption> [ OF <oWnd> ]; [ ID <nId> ] [ SIZE <width>, <height> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.3.12 REDEFINE RADIOBUTTON REDEFINE [ [ [ [ [ [ [ [ RADIOBUTTON <oRadio> OF <oWnd> ] ID <nId> COLOR <tcolor> ] BACKCOLOR <bcolor> ] ON INIT <bInit> ] ON SIZE <bSize> ] ON PAINT <bDraw> ] FONT <oFont> ] TOOLTIP <ctoolt> ]

4.3.13 RADIOGROUP RADIOGROUP 4.3.14 END RADIOGROUP END RADIOGROUP [ SELECTED <nSel> ] 4.3.15 @ <x>,<y> PANEL @ <x>,<y> PANEL <oPanel> [ OF <oWnd> ]; [ ID <nId> ] [ SIZE <width>, <height> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ STYLE <nStyle> ]

4.3.16 REDEFINE PANEL REDEFINE [ [ [ [ PANEL <oCheck> OF <oWnd> ] ID <nId> ON INIT <bInit> ] ON SIZE <bSize> ] ON PAINT <bDraw> ]

4.3.17 @ <x>,<y> BROWSE @ <x>,<y> BROWSE <oBrowse> [ ARRAY ] [ DATABASE ] [ OF <oWnd> ]; [ ID <nId> ] [ SIZE <width>, <height> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ ON CLICK <bClick> ] [ ON GETFOCUS <bGetFocus> ] [ ON LOSTFOCUS <bLostFocus> ] [ STYLE <nStyle> ] [ <lNoVScr: NO VSCROLL> ] [ <lNoBord: NO BORDER> ] [ FONT <oFont> ]

4.3.18 REDEFINE BROWSE REDEFINE [ [ [ [ [ [ [ [ [ [ BROWSE <oBrowse> ARRAY ] DATABASE ] OF <oWnd> ] ID <nId> ON INIT <bInit> ] ON SIZE <bSize> ] ON PAINT <bDraw> ] ON CLICK <bClick> ] ON GETFOCUS <bGetFocus> ] ON LOSTFOCUS <bLostFocus> ] FONT <oFont> ]

4.3.19 ADD COLUMN ADD COLUMN <block> < TO <oBrowse> [ HEADER <cTitle> ] [ TYPE <type> ] [ LEN <length> ] [ DEC <dec> ] [ <lEdit: EDITABLE> ]

4.3.20 @ <x>,<y> OWNERBUTTON @ <x>,<y> OWNERBUTTON <oOwnBtn> [ OF <oWnd> ]; [ ID <nId> ] [ SIZE <width>, <height> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ ON CLICK <bClick> ] [ STYLE <nStyle> ] [ FLAT ] [ TEXT <cText> [ COLOR <color> ] [ FONT <font> ] [ COORDINATES <xt>, <yt>, <widthtt>, <heightt> ] ] [ BITMAP <bmp> [ FROM RESOURCE ] [ TRANSPARENT ] [ COORDINATES <xb>, <yb>, <widthtb>, <heightb> ] ]

4.3.21 REDEFINE OWNERBUTTON REDEFINE OWNERBUTTON <oOwnBtn> [ OF <oWnd> ] ID <nId> [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ ON CLICK <bClick> ] [ STYLE <nStyle> ] [ FLAT ] [ TEXT <cText> [ COLOR <color> ] [ FONT <font> ] [ COORDINATES <xt>, <yt>, <widthtt>, <heightt> ] ] [ BITMAP <bmp> [ FROM RESOURCE ] [ TRANSPARENT ] [ COORDINATES <xb>, <yb>, <widthtb>, <heightb> ] ]

4.3.22 @ <x>,<y> GROUPBOX @ <x>,<y> GROUPBOX [ <oGroup> CAPTION ] <caption> [ OF <oWnd> ]; [ ID <nId> ] [ SIZE <width>, <height> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ STYLE <nStyle> ] [ FONT <oFont> ]

4.3.23 @ <x>,<y> DATEPICKER @ <x>,<y> DATEPICKER [ <oPicker> CAPTION ] <caption> [ OF <oWnd> ] ID <nId> [ SIZE <width>, <height> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ INIT <value> ] [ ON INIT <bInit> ] [ ON GETFOCUS <bGetFocus> ] [ ON LOSTFOCUS <bLostFocus> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.3.24 @ <x>,<y> UPDOWN @ <x>,<y> UPDOWN [ <oUpDown> INIT ] <nInit> RANGE <nLower>, <nUpper> [ OF <oWnd> ] [ ID <nId> ] [ SIZE <width>, <height> ] [ WIDTH <nUpdWidth> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bDraw> ] [ ON GETFOCUS <bGfocus> ] [ ON LOSTFOCUS <bLfocus> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.3.25 @ <x>,<y> TAB @ <x>,<y> TAB [ [ [ [ [ [ [ [ [ [ <oTab> ITEMS ] <aTabs> OF <oWnd> ] ID <nId> ] SIZE <width>, <height> ] STYLE <nStyle> ] FONT <oFont> ] ON INIT <bInit> ] ON SIZE <bSize> ] ON PAINT <bDraw> ] ON CHANGE <bChange> ]

4.3.26 BEGIN PAGE BEGIN PAGE <cname> OF <oTab> 4.3.27 END PAGE END PAGE OF <oTab>

4.3.28 @ <x>,<y> TREE @ <x>,<y> TREE [ <oTree> ] [ OF <oWnd> ] [ ID <nId> ] [ SIZE <width>, <height> ] [ FONT <oFont> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ STYLE <nStyle> ] [<lEdit: EDITABLE> ] [ BITMAP <aBmp> [<res: FROM RESOURCE>] ]

4.3.29 INSERT NODE INSERT NODE [ <oNode> TITLE ] <cTitle> [ AFTER <oPrev> ] [ BEFORE <oNext> ] [ BITMAP <aBmp> ] [ ON CLICK <bClick> ] TO <oTree>

4.3.30 SET TIMER SET TIMER [ <oTimer> ] [ OF <oWnd> ] [ ID <id> ] VALUE <value>

ACTION <bAction>

4.3.31 @ <x>,<y> BITMAP @ <x>,<y> BITMAP [ <oBmp> SHOW ] <bitmap> [<res: FROM RESOURCE> ] [ OF <oWnd> ] [ ID <nId> ] [ SIZE <width>, <height> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ TOOLTIP <ctoolt> ] 4.3.32 @ <x>,<y> REDEFINE BITMAP REDEFINE BITMAP [ <oBmp> SHOW ] <bitmap> [ OF <oWnd> ] [ ID <nId> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ TOOLTIP <ctoolt> ]

4.3.33 @ <x>,<y> ICON @ <x>,<y> ICON [ <oBmp> SHOW ] <icon> [<res: FROM RESOURCE> ] [ OF <oWnd> ] [ ID <nId> ] [ SIZE <width>, <height> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ TOOLTIP <ctoolt> ]

4.3.34 @ <x>,<y> REDEFINE ICON REDEFINE ICON [ <oBmp> SHOW ] <icon> [ OF <oWnd> ] [ ID <nId> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ TOOLTIP <ctoolt> ]

4.3.35 @ <x>,<y> IMAGE @ <x>,<y> IMAGE [ <oBmp> SHOW ] <image> [ OF <oWnd> ] [ ID <nId> ] [ SIZE <width>, <height> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ TOOLTIP <ctoolt> ]

4.3.36 @ <x>,<y> REDEFINE IMAGE REDEFINE IMAGE [ <oBmp> SHOW ] <image> [ OF <oWnd> ] [ ID <nId> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ TOOLTIP <ctoolt> ]

4.3.37 @ <x>,<y> LINE @ <x>,<y> LINE [ <oLine> ] [ LENGTH <length> ] [ OF <oWnd> ] [ ID <nId> ] [<lVert: VERTICAL>] [ ON SIZE <bSize> ]

4.3.38 @ <x>,<y> RICHEDIT @ <x>,<y> RICHEDIT [ <oEdit> TEXT ] <vari> [ OF <oWnd> ] [ ID <nId> ] [ SIZE <width>, <height> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ ON INIT <bInit> ] [ ON SIZE <bSize> ] [ ON PAINT <bPaint> ] [ ON GETFOCUS <bGfocus> ] [ ON LOSTFOCUS <bLfocus> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.3.39 @ <x>,<y> SPLITTER @ <x>,<y> SPLITTER [ <oSplit> ] [ OF <oWnd> ] [ ID <nId> ] [ SIZE <width>, <height> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ ON SIZE <bSize> ] [ ON PAINT <bPaint> ] [ DIVIDE <aLeft> FROM <aRight> ]

4.3.40 @ <x>,<y> GRAPH @ <x>,<y> GRAPH [ <oGraph> DATA ] <aData> [ OF <oWnd> ] [ ID <nId> ] [ SIZE <width>, <height> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ ON SIZE <bSize> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.4 Comando Get


Consigue que el sistema no use una clase especial, algo como HGet. Usa las mismas clases del control (HEdit, HCheckButton, etc.)
4.4.1 @ <x>,<y> GET @ <x>,<y> GET [ [ [ [ [ [ [ [ [ [ [ [ <oEdit> VAR ] <vari> OF <oWnd> ] ID <nId> ] SIZE <width>, <height> ] COLOR <tcolor> ] BACKCOLOR <bcolor> ] PICTURE <cPicture> ] WHEN <bWhen> ] VALID <bValid> ] STYLE <nStyle> ] FONT <oFont> ] TOOLTIP <ctoolt> ]

4.4.2

REDEFINE GET REDEFINE [ [ [ [ [ [ [ GET [ <oEdit> VAR ] <vari> OF <oWnd> ] ID <nId> COLOR <tcolor> ] BACKCOLOR <bcolor> ] WHEN <bWhen> ] VALID <bValid> ] FONT <oFont> ] TOOLTIP <ctoolt> ]

4.4.3

@ <x>,<y> GET CHECKBOX @ <x>,<y> GET CHECKBOX [ <oEdit> VAR ] <vari> [ OF <oWnd> ] [ ID <nId> ] [ SIZE <width>, <height> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ <valid: VALID,ON CLICK> <bValid> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.4.4

REDEFINE GET CHECKBOX REDEFINE GET CHECKBOX [ <oEdit> VAR ] <vari> [ OF <oWnd>] ID <nId> [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ <valid: VALID,ON CLICK> <bValid> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.4.5

@ <x>,<y> GET COMBOBOX @ <x>,<y> GET COMBOBOX [ <oCombo> VAR ] <vari> ITEMS ] <aItems> [ OF <oWnd> ] [ ID <nId> ] [ SIZE <width>, <height> ] [ ON CHANGE <bChange> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.4.6

REDEFINE GET COMBOBOX REDEFINE GET COMBOBOX [ <oCombo> VAR ] <vari> ITEMS ] <aItems> [ OF <oWnd> ] ID <nId> [ ON CHANGE <bChange> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.4.7

GET RADIOGROUP GET RADIOGROUP [ <ogr> VAR ] <vari> @ <x>,<y> GET DATEPICKER @ <x>,<y> GET DATEPICKER [ <oPick> VAR ] <vari> [ OF <oWnd>] [ ID <nId> ] [ SIZE <width>, <height> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ WHEN <bWhen> ] [ VALID <bValid> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

4.4.8

4.4.9

@ <x>,<y> GET UPDOWN @ <x>,<y> GET UPDOWN[ <oUpDown> VAR ] <vari> RANGE <nLower>, <nUpper> [ OF <oWnd> ] [ ID <nId> ] [ SIZE <width>, <height> ] [ WIDTH <nUpdWidth> ] [ COLOR <tcolor> ] [ BACKCOLOR <bcolor> ] [ PICTURE <cPicture> ] [ WHEN <bWhen> ] [ VALID <bValid> ] [ STYLE <nStyle> ] [ FONT <oFont> ] [ TOOLTIP <ctoolt> ]

FUNCIONES
5.1 Comandos de dilogos
5.1.1 SelectFont( [ oFont ] )

Esta Funcin selecciona conjunto de caracteres OFont - parmetro opcional, objeto del conjunto de caracteres actual ( caso de Hfont ). Return value - la serie con las caractersticas del conjunto de caracteres seleccionadas (nHandle, fontName, nWidth, nHeight ,fnWeight, fdwCharSet, fdwItalic, fdwUnderline, fdwStrikeOut) o Nil, s l conjunto de caracteres no fuera seleccionado. Normalmente no se necesitaba llamar esta funcin, usa
HFont():Select(oFont).

5.1.2 SelectFile( cDescript,cMask,[ cInitDir ], [ cTitle ] )

Esta Funcin selecciona archivo. cDescript - esta secuencia aparece en el dilogo como descripcin de un tipo del archivo. cMask - encadene el tipo parmetro, describiendo la mscara de archivo. cInitDir - parmetro opcional de la secuencia, el directorio inicial para seleccionar del archivo. cTitle - parmetro opcional de la secuencia, el ttulo de una caja de dilogo. Return value - una secuencia con un nombre del archivo seleccionado, o una secuencia vaca, si un archivo no fue seleccionado.
5.1.3 SaveFile( cPrompt,cDescript,cMask,cInitDir,cTitle )

Esta funcin llama el dilogo normal para la economa del archivo. cPrompt CDescript - esta secuencia aparece como aviso de un nombre del archivo. - esta secuencia aparece en el dilogo como descripcin de un tipo del archivo. cMask - encadene el tipo parmetro, describiendo la mscara de archivo. cInitDir - parmetro opcional de la secuencia, el directorio inicial para seleccionar del archivo. Return value - una secuencia con un nombre del archivo seleccionado, o una secuencia vaca, si un archivo no fue seleccionado.
5.1.4 PrintSetup()

Esta Funcin selecciona la impresora. Return value (numrico) - al contexto del dispositivo (hDC) de la impresora seleccionada, 0- si la impresora no fue seleccionada.
5.1.5 hwg_ChooseColor( nColorCurrent )

Esta Funcin selecciona

el color.

nColorCurrent - n parmetro numrico, valor inicial de un color, Return value ( numeric ) - color seleccionado

5.2 Dilogos de MessageBoxes y de HwGUI


5.2.1 MsgInfo( cMessage,cTitle ) 5.2.2 MsgStop( cMessage,cTitle ) 5.2.3 MsgOkCancel( cMessage,cTitle ) 5.2.4 MsgYesNo( cMessage,cTitle ) 5.2.5 MsgBeep( nSound ) 5.2.6 MsgGet( cTitle, cText, nStyle, x, y, nDlgStyle ) 5.2.7 WChoice( arr, cTitle, nLeft, nTop, oFont, clrT, clrB, clrTSel, clrBSel )

5.3 Funciones de dibujo.


6 CLASSES 6.1 Class hierarchy El esquema siguiente ilustra la jerarqua de clases, puesta en ejecucin actualmente en HwGUI.

6.2 HObject

Es una clase base para todas las clases.

6.3 HCustomWindow

Sirve como base para las ventanas, dilogos y controles. Las variables y los mtodos de HCustomWindow proporcionan el comportamiento bsico de las clases que heredan, el comportamiento que los componentes pueden eliminar o modificar su funcionalidad
DATA handle oParent title type nTop, nLeft, nWidth, nHeight tcolor, bcolor, brush style extstyle lHide oFont aEvents, aNotify aControls bInit bDestroy bSize bPaint bGetFocus bLostFocus bOther cargo METHODS AddControl( oCtrl ) DelControl( oCtrl ) AddEvent( nEvent,nId,bAction ) FindControl( nId ) Hide() Show()

6.3.1 HWindow
DATA CLASS VAR aWindows CLASS VAR szAppName menu, nMenuPos, oPopup, hAccel oIcon, oBmp oNotifyIcon, bNotify, oNotifyMenu lClipper lTray METHODS New( lType,oIcon,clr,nStyle,x,y,width,height,cTitle,cMenu,nPos,oFont, bInit,bExit,bSize,bPaint,bGfocus,bLfocus,bOther,cAppName,oBmp ) Activate( lShow ) InitTray( oNotifyIcon, bNotify, oNotifyMenu ) AddItem( oWnd ) DelItem( oWnd ) FindWindow( hWnd ) GetMain() GetMdiActive()

6.3.2 HDialog
DATA CLASS VAR aDialogs CLASS VAR aModalDialogs oPopup lResult lUpdated // TRUE, if any GET is changed lClipper // Set it to TRUE for moving between GETs with ENTER key GetList nLastKey oIcon, oBmp METHODS New( lType,nStyle,x,y,width,height,cTitle,bInit,bExit,bSize, bPaint,bGfocus,bLfocus,bOther,lClipper,oBmp,oIcon ) Activate(lNoModal) AddItem( oWnd,lModal ) DelItem( oWnd,lModal ) FindDialog( hWnd )

6.3.3 HControl
DATA id tooltip lInit METHODS Init() SetColor( tcolor,bcolor,lRepaint ) NewId() Move( x1,y1,width,height )

6.3.3.1 HBrowse
DATA winclass active lChanged lDispHead debo desplegar los ttulos? lDispSep Debo exhibir los separadores? aColumns HColumn's array rowCount Nmero de las filas de datos visibles rowPos Posicin actual de la fila rowCurrCount Nmero actual de fila colPos Posicin de columna actual nColumns Nmero de las columnas visibles de los datos nLeftCol Columna extrema izquierda xpos freeze Nmero de las columnas a congelar kolz El nmero de expedientes dentro del browse tekzp,msrec recCurr headColor Header text color sepColor Separators color tcolorSel,bcolorSel,brushSel bSkip,bGoTo,bGoTop,bGoBot,bEof,bBof bRcou,bRecno bPosChanged, bLineOut bEnter, bKeyDown internal alias Alias name of browsed database x1,y1,x2,y2,width,height minHeight lEditable lAppable lAppMode lAutoEdit lUpdated lAppended METHODS New( lType,oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,oFont ; bInit,bSize,bPaint,bEnter,bGfocus,bLfocus,lNoVScroll,lNoBorder ) InitBrw( nType ) Rebuild() Activate() Redefine( lType,oWnd,nId,bInit,bSize,bDraw,bEnter,bGfocus,bLfocus ) FindBrowse( nId ) AddColumn( oColumn )

InsColumn( oColumn,nPos ) DelColumn( nPos ) Paint() LineOut() HeaderOut( hDC ) DoHScroll( wParam ) DoVScroll( wParam ) LineDown() LineUp() PageUp() PageDown() Bottom() Top() ButtonDown( lParam ) ButtonUp( lParam ) ButtonDbl( lParam ) MouseMove( wParam, lParam ) Edit( wParam,lParam ) Append() RefreshLine() Refresh() ShowSizes() End()

6.3.3.2 HPanel
DATA winclass METHODS New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight, bInit,bSize,bPaint ) Activate() Redefine( oWnd,nId,nHeight,bInit,bSize,bPaint ) Paint() End()

6.3.3.3 HOwnerButton
DATA CLASSDATA oSelected winclass lFlat state bClick text,tfont,xt,yt,widtht,heightt bitmap,xb,yb,widthb,heightb,lTransp METHODS New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight, bInit,bSize,bPaint,bClick,lflat, cText,color,font,xt,yt,widtht,heightt, bmp,lResour,xb,yb,widthb,heightb,lTr, cTooltip ) Activate() Redefine( oWndParent,nId,bInit,bSize,bPaint,bClick,lflat, cText,color,font,xt,yt,widtht,heightt, bmp,lResour,xb,yb,widthb,heightb,lTr, cTooltip ) Paint() MouseMove( wParam, lParam ) MDown() MUp() Press() Release() End()

6.3.3.4 HSplitter
DATA winclass aLeft aRight lVertical hCursor lCaptured, lMoved METHODS New( oWndParent,nId,nLeft,nTop,nWidth,nHeight, bSize,bPaint,color,bcolor,aLeft,aRight ) Activate() Init() Paint( lpdis ) Drag( lParam ) DragAll()

6.3.3.5 HStatus
DATA aParts METHODS New( oWndParent,nId,nStyle,aParts,bInit,bSize,bPaint ) Activate()

6.3.3.6 HStatic
DATA CLASS VAR winclass METHODS New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont,bInit,bSize,bPaint,ctool t,tcolor,bcolor,lTransp ) Activate() Redefine( oWndParent,nId,oFont,bInit, ; bSize,bPaint,ctoolt,tcolor,bcolor,lTransp ) SetValue(value)

6.3.3.7 HButton
DATA CLASS VAR winclass METHODS New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont, bInit,bSize,bPaint,bClick,ctoolt,tcolor,bcolor ) Activate() Redefine( oWnd,nId,oFont,bInit,bSize,bDraw,bClick,ctoolt,tcolor,bcolor )

6.3.3.8 HEdit
DATA CLASS VAR winclass CLASS VAR lCtrl CLASS VAR lShift lMultiLine cType bSetGet bValid cPicFunc, cPicMask lPicComplex lFirst lChanged

METHODS New( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight,oFont, bInit,bSize,bPaint,bGfocus,bLfocus,ctoolt,tcolor,bcolor,cPicture,lNoBorder ) Activate() Redefine( oWnd,nId,vari,bSetGet,oFont,bInit,bSize,bDraw,bGfocus,bLfocus,ctoolt,tcolor,bcolor,cPic ture ) Init() SetGet(value) INLINE Eval( ::bSetGet,value ) Refresh()

6.3.3.9.

HChecButton
DATA CLASS VAR winclass bSetGet value METHODS New( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont, bInit,bSize,bPaint,bClick,ctoolt,tcolor,bcolor ) Activate() Redefine( oWnd,nId,vari,bSetGet,oFont,bInit,bSize,bDraw,bClick,ctoolt,tcolor,bcolor ) Init()

6.3.3.10

HRadioButton
DATA CLASS VAR winclass CLASS VAR oGroup METHODS New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont, bInit,bSize,bPaint,bClick,ctoolt,tcolor,bcolor ) Activate() Redefine( oWnd,nId,oFont,bInit,bSize,bDraw,bClick,ctoolt,tcolor,bcolor )

6.3.3.11

HCombobox
DATA CLASS VAR winclass aItems value bChangeSel METHODS New( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight,aItems, bInit,bSize,bPaint,bChange,cTooltip ) Activate() Redefine( oWnd,nId,vari,bSetGet,aItems,bInit,bSize,bPaint,bChange,cTooltip ) Init( aCombo, nCurrent )

6.3.3.12

HGroup
DATA CLASS VAR winclass METHODS New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont, bInit,bSize,bPaint,tcolor,bcolor ) Activate()

6.3.3.13

HLine
DATA CLASS VAR winclass lVert oPenLight, oPenGray METHODS New( oWndParent,nId,lVert,nLeft,nTop,nLength,bSize ) Activate() Paint()

6.3.3.14

HSayImage
DATA CLASS VAR winclass oImage METHODS New( oWndParent,nId,nLeft,nTop,nWidth,nHeight,bInit, bSize,ctoolt ) Activate() Redefine( oWndParent,nId,bInit,bSize,ctoolt ) End()

6.3.3.14.1

HSayBmp
METHODS New( oWndParent,nId,nLeft,nTop,nWidth,nHeight,Image,lRes,bInit, bSize,ctoolt ) Redefine( oWndParent,nId,Image,lRes,bInit,bSize,ctoolt ) Init()

6.3.3.14.2

HSayIcon
METHODS New( oWndParent,nId,nLeft,nTop,nWidth,nHeight,Image,lRes,bInit, bSize,ctoolt ) Redefine( oWndParent,nId,Image,lRes,bInit,bSize,ctoolt ) Init()

6.3.3.14.3

HSayFImage
METHODS New( oWndParent,nId,nLeft,nTop,nWidth,nHeight,Image,lRes,bInit, bSize,ctoolt ) Redefine( oWndParent,nId,Image,lRes,bInit,bSize,ctoolt ) Init()

6.3.3.15

HDatePicker
DATA CLASS VAR winclass bSetGet value METHODS New( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight, ; oFont,bInit,bGfocus,bLfocus,ctoolt,tcolor,bcolor ) Activate() Init()

6.3.3.16

HUpDown
DATA CLASS VAR winclass bSetGet hUpDown, idUpDown, styleUpDown nLower nUpper nUpDownWidth lChanged METHODS New( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight, ; oFont,bInit,bSize,bPaint,bGfocus,bLfocus,ctoolt,tcolor,bcolor,nUpDWidth,nLower,nUpper ) Activate() Init() Refresh()

6.3.3.17

HTab
DATA CLASS VAR winclass aTabs aPages bChange,bChange2 oTemp METHODS New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight, ; oFont,bInit,bSize,bPaint,aTabs,bChange ) Activate() Init() SetTab( n ) StartPage( cname ) EndPage() ChangePage( nPage ) HidePage( nPage ) ShowPage( nPage ) GetActivePage( nFirst,nEnd ) End()

6.3.3.18

HTree
DATA CLASS VAR winclass aItems oSelected himl,aImages,Image1,Image2 bItemChange, bExpand lEmpty METHODS New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,oFont, bInit,bSize,color,bcolor,aImages,lResour,lEditLabels ) Activate() Init() AddNode( cTitle, oPrev, oNext, bAction, aImages ) FindChild( handle ) GetSelected() EditLabel( oNode ) Expand( oNode ) Select( oNode ) Clean()

6.5 HColumn
DATA block,heading,width,type,length,dec,cargo nJusHead, nJusLin tcolor,bcolor,brush lEditable aList aBitmaps bValid,bWhen bEdit METHODS New( cHeading,block,type,length,dec,lEditable,nJusHead,nJusLin )

6.6 HRadioGroup
DATA CLASS VAR oGroupCurrent aButtons value bSetGet METHODS New( vari,bSetGet ) EndGroup( nSelected ) SetValue( nValue )

6.7 HFont
DATA CLASS VAR aFonts handle name, width, height ,weight charset, italic, Underline, StrikeOut nCounter METHODS Add( fontName, nWidth, nHeight ,fnWeight, fdwCharSet, ; fdwItalic, fdwUnderline, fdwStrikeOut, nHandle ) Select() Release()

6.8 HPen
DATA CLASS VAR aPens handle style, width, color nCounter METHODS Add( style, width, color ) Release()

6.9 HBrush
DATA CLASS VAR aBrushes handle color nHatch nCounter METHODS Add( color,nHatch ) Release()

6.10

HBitmap
DATA CLASS VAR aBitmaps handle name nWidth, nHeight nCounter METHODS AddResource( name ) AddFile( name,hDC ) AddWindow( oWnd,lFull ) Release()

6.11

HIcon
DATA CLASS VAR aIcons handle name nCounter METHODS AddResource( name ) AddFile( name,hDC ) Release()

6.12

HPrinter
DATA hDCPrn hDC aMeta lPreview cMetaName METHODS New( cPrinter )

EndDoc() StartPage() EndPage() ReleaseMeta() PlayMeta( nPage, oWnd, x1, y1, x2, y2 ) PrintMeta( nPage ) Preview( cTitle ) La abertura de una ventana de la inspeccin previo, sta se debe utilizar despus de que llamada de EndDoc(). End() Lanzar la impresora. Box( x1,y1,x2,y2,oPen ) Line( x1,y1,x2,y2,oPen ) Say( cString,x1,y1,x2,y2,nOpt,oFont ) Bitmap( x1,y1,x2,y2,nOpt,hBitmap )

Abrir una impresora. Si se omite la ' IMPRESORA ', el dilogo de la disposicin de impresora aparece; si la ' IMPRESORA ' es una ecuencia vaca, se utiliza la impresora del defecto.StartDoc(lPreview,cMetaName ) Comienza la impresin de un lPreview del documento debe ser VERDAD, si usted desea ver el resultado de antemano de impresin. Final de una impresin del documento.

6.13

HTreeNode

DATA CLASS VAR winclass aItems handle oTree, oParent bAction cargo METHODS New( oTree, oParent, oPrev, oNext, cTitle, bAction,aImages ) AddNode( cTitle, oPrev, oNext, bAction, aImages ) Delete() FindChild( handle ) GetText()

6.14

HTimer
DATA CLASS VAR aTimers id value oParent bAction METHODS New( oParent,id,value,bAction ) End()

6.15 HFreeImage

Esta clase es similar a HBitmap, HIcon permite cargar imagenes BMP, JPEG, PNG y otros formatos. Usa la biblioteca de FreeImage (http://freeimage.sourceforge.net>) - si usted lo incluye en su aplicacin, necesita tener FreeImage.dll.
DATA CLASS VAR aImages handle hBitmap name nWidth, nHeight nCounter METHODS AddFile( name ) Cargue la imagen de un archivo FromBitmap( oBitmap ) Cree una imagen de una BITMAP Draw( hDC,nLeft,nTop,nWidth,nHeight ) Dibuje la imagen en contect especificado del dispositivo Release() Descargue la imagen

Un ejemplo de uso de esta clase esta en samples/viewer/viewer.prg.

7 QHTM INTEGRATION
7.1 Descripcin QHTM es una biblioteca de C++, que permite exhibir y imprimir el contenido de HTML - en cualquier ventana, contexto del dispositivo, en un informe, en un botn o en un tooltip. Para ms detalles http://www.gipsysoft.com. HwGUI proporciona un interfaz para esta biblioteca. Para utilizarlo, usted necesita descargar QHTM del http://www.gipsysoft.com/qhtm/freedownload.shtml y copiar qhtm.dll al mismo directorio, donde est su uso. Atencin!!! cQhtm se lanza bajo licencia que harbour y HwGUI, as que no se olvida de leerlo antes de usar! 7.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> ]

Este comando crea control de QHTM. El contenido del HTML se puede asignar de tres maneras: Usted puede escribirlo despus de clusula CAPTION. Puede estar en el archivo externo del HTML, que el nombre seala despus de clusula FILE. Archivo del recurso. En este recurso apropiado, el nombre se firma despus de clusula RESOURCE. ON CLICK la clusula determina el codeblock, que ser ejecutado cuando el usuario chasca encendido un acoplamiento externo. ON SUBMIT la clusula determina el codeblock, que ser ejecutado cuando el usuario somete la forma.
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> ]

Este comando redefines QHTM controla los recursos. El contenido del HTML se puede asignar de tres maneras las mismas tres maneras con el comando @ ... QHTM
@ <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> ] Este comando trabaja exactamente como @ ... BUTTON,

pero <caption> puede incluir

el contenido del HTML.

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

Este comando trabaja exactamente como REDEFINE BUTTON, pero <caption> puede incluir el contenido del HTML. 7.3 Funciones
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 )

8 LICENCIA
HwGUI se libera bajo la misma licencia que Harbour. Este programa es software libre; puede redistribuirlo y/o modificarlo bajo trminos de la licencia GNU segn lo publicado por la fundacin libre de software; versin 2 o (en su opcin) cualquier versin ms ACTUALIZADA. Este programa se distribuye con la esperanza de que sea til, pero SIN NINGUNA GARANTA; sin uniforme la garanta implicada del MERCHANTABILITY o de la APTITUD PARA Un PROPSITO PARTICULAR. Vea la licencia el pblico en general del GNU para ms detalles. Usted debe haber recibido una copia de la licencia el pblico en general del GNU junto con este software; vea el COPIADO del archivo. Si no, escriba a los Free Software Foundation, Inc., lugar de 59 templos, habitacin 330, Boston, mA 02111-1307 los E.E.U.U. (o visite el Web site http://www.gnu.org/). Como excepcin especial, usted tiene permiso para las aplicaciones adicionales del contenido en su lanzamiento de HWGUI. La excepcin es que, si usted liga la biblioteca de HWGUI a otros archivos para producir un ejecutable, esto no por s mismo causa el resultar ejecutable es cubierta por la licencia de GNU. Su uso de ese ejecutable no es de manera alguna restringida a causa de ligar el cdigo de la biblioteca de HWGUI en l.

9 SOBRE EL AUTOR
Alexander S. Kresin Creador de HwGUI Nacio en la ciudad Baku, Union Sovietica, En diciembre 28 de 1960

Anda mungkin juga menyukai