HwGUI is an add-on library for Harbour and xHarbour, intended for creating GUI applications on Win32 platform. HwGUI is based on direct calls of Win32 API, so it cannot be used with other operating systems. 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.
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 since release 2.0 HwGUI uses classes.
HwGUI is distributed as a zip package. Currently it doesn't use any setup utility, you need simply unzip it to any place you want. The zip package includes following files and directories:
| make_b32.bat | - Command file to build HwGUI.lib with Borland C | |
| makefile.bc | ||
| make_vc.bat | - Command file to build HwGUI.lib with MSVC | |
| makefile.vc | ||
| make_pc.bat | - Command file to build HwGUI.lib with Pelles C | |
| makefile.pc | ||
| make_w32.bat | - Command file to build HwGUI.lib with Open Watcom C | |
| makefile.wc | ||
| makemngw.bat | - Command file to build HwGUI.lib with Mingw | |
| makefile.gcc | ||
| makedll.bat | ||
| makedll.bc | ||
| license.txt | ||
| install.txt | ||
| whatsnew.txt | ||
| DOC | - Folder with documentation | |
| IMAGE | - Folder with sample image files | |
| INCLUDE | - Folder with HwGUI header files | |
| LIB | - Folder for HwGUI lib | |
| OBJ | ||
| SAMPLES | - Folder with HwGUI samples | |
| SOURCE | - Folder with Hwgui sources | |
| UTILS | - Folder with Hwgui utilities |
Before building the library you need to set the HB_PATH environment variable, it should point to the directory where your copy of Harbour is. Then run one of command files depending of the C compiler you use ( make_b32.bat for Borland C, make_pc.bat for Pelles C, make_vc.bat for MSVC, make_w32.bat for Open Watcom C, makemngw.bat for Mingw ) - this will build four libraries - hwgui.lib, procmisc.lib, hwg_qhtm.lib and hbxml.lib. That's all !
Function Main
Local oMainWnd, oFont
Local aCombo := {"First","Second" }
PREPARE FONT oFont NAME "MS Sans Serif" WIDTH 0 HEIGHT -13Return
INIT WINDOW oMainWnd TITLE "Example" ;
FONT oFont ;
ON EXIT {||MsgYesNo("Really want to quit ?")}
@ 20,10 EDITBOX "Hello, World!" ;
SIZE 200,30 ;
@ 270,10 COMBOBOX aCombo ;
SIZE 100, 150 TOOLTIP "Combobox"
@ 120,60 BUTTON "Close" ;
SIZE 150,30 ;
ON CLICK {||EndWindow()}
MENU OF oMainWnd
MENUITEM "About" ACTION MsgInfo("First HwGUI Application")
ENDMENU
ACTIVATE WINDOW oMainWnd
First thing you will want to do, I think, is to create the main window. The best way to do this is the command INIT WINDOW. In this command you can define initial position and the size of the window, it's style, icon, background color. You can set also event handlers - codeblocks, which are evaluated for different events ( INIT, EXIT, PAINT, SIZE changing, GETFOCUS, LOSTFOCUS and others ).
Then you need to define controls for that window and the main menu ( MENU ... ENDMENU commands), and, at least, activate the window, ( ACTIVATE WINDOW ) show it on the screen. Let analyse the above sample.
PREPARE FONT oFont NAME "MS Sans Serif" WIDTH 0 HEIGHT -13At first, we create the font object for the main window. HwGUI works in such a way, that if a font isn't defined for a control, this control uses the font, defined for his parent window.
INIT WINDOW oMainWnd MAIN TITLE "Example" ;This command creates main window with the title "Example" and with previously created font. ON EXIT clause will cause appearance of a message box, user will need to choose "Yes" to quit the application.
FONT oFont ;
ON EXIT {||MsgYesNo("Really want to quit ?")}
@ 20,10 EDITBOX "Hello, World!" ;The above commands creates appropriate controls - Edit, Combobox and Push Button. ComboBox is initialized with aCombo array, which was declared before. Button has an event handler defined - closing the application.
SIZE 200,30 ;
@ 270,10 COMBOBOX aCombo ;
SIZE 100, 150 TOOLTIP "Combobox"
@ 120,60 BUTTON "Close" ;
SIZE 150,30 ;
ON CLICK {||EndWindow()}
MENU OF oMainWndThese commands creates the main menu, which includes the only item "About".
MENUITEM "About" ACTION MsgInfo("First HwGUI Application")
ENDMENU
ACTIVATE WINDOW oMainWndAnd, at least, this last command activates the main window. It appears on the screen with menu and all controls defined.
This command creates the window - main, MDI or MDI CHILD. To force this window show up on the screen you need to activate it later. You can do this with ACTIVATE WINDOW command or with Activate() method of that window object.
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>]
[ MAXIMIZE]
[ HELP <cHelp> ]
[ HELPID <nHelpId> ]
This command creates the dialog box. To force the dialog show up on the screen you need to activate it later. You can do this with ACTIVATE DIALOG command or with Activate() method of that window object.
INIT DIALOG <oWnd>[ FROM RESOURCE ]
[ TITLE <cTitle> ]
[ AT <x>, <y> ]
[ SIZE <width>, <height> ]
[ ICON <ico> ]
[ BACKGROUND BITMAP <oBmp> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ CLIPPER ]
[ NOEXIT ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bPaint> ]
[ ON GETFOCUS <bGfocus> ]
[ ON LOSTFOCUS <bLfocus> ]
[ ON OTHER MESSAGES <bOther> ]
[ ON EXIT <bExit> ]
[ HELPID <nHelpId>> ]
All clauses has the same meaning as in INIT WINDOW command,
there is only three specific clause:
FROM RESOURCE - it is used if you create the dialog box from resource file;
CLIPPER - to force the Clipper like behavior - the Enter key is used for moving between GET's;
NOEXIT - the Enter key doesn't cause closing of a dialog box.
ACTIVATE WINDOW <oWnd>
This command is equal to 'oWnd:Activate()' call. It shows the previously created window and starts messages processing for it.
4.1.4. ACTIVATE DIALOGACTIVATE DIALOG <oDlg> [ NOMODAL ]
This command is equal to 'oDlg:Activate()' call. It shows the previously defined dialog and starts messages processing for it. By default, it creates modal dialog. You can create modeless dialog, specifying NOMODAL clause in this command.
4.1.5. DIALOG ACTIONS OFDIALOG ACTIONS OF <oWnd>ON <id1>,<id2> ACTION <b1>
[ ON <idn1>,<idn2> ACTION <bn> ]
This is a compatibility command and therefore not recommended. The window
gets WM_COMMAND message when the user selects a command item from a menu,
when a control sends a notification message to its parent window,
or when an accelerator keystroke is translated.
You can specify in this command the event, the source of the event and the appropriate action.
id1 ...idn1 is the event code, id1 ... idn2 - is the identificator of the control,
b1 ... bn - the codeblock.
Take a look at the samples to see how this command may be used.
MENU [ OF <oWnd> ] [ ID <nId> ] [ TITLE <cTitle> ]4.2.2. ENDMENU
ENDMENU4.2.3. MENUITEM
MENUITEM <item> [ ID <nId> ]4.2.4. SEPARATORACTION <act>
[ BITMAP <bmp> ]
[ ACCELERATOR <flag>, <key> ]
[ <lDisabled: DISABLED> ]
SEPARATOR4.2.5. MENU FROM RESOURCE OF
MENU FROM RESOURCE OF <oWnd>ON <id1> ACTION <b1>
[ ON <idn> ACTION <bn> ]
This command is used if you specify menu in resource file, it defines actions for each menu item.
4.2.6. CONTEXT MENUCONTEXT MENU <oMenu>4.2.7. ACCELERATOR
ACCELERATOR <flag>, <key>
[ ID <nId> ]
ACTION <act>
All the following commands creates the instances of classes, they are preprocessed into the New() or Redefine() method of appropriate class.
4.3.1. ADD STATUS TOADD STATUS [ TO <oWnd> ]4.3.2. @ <x>,<y> SAY[ ID <nId> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ PARTS <aparts,...> ]
@ <x>,<y> SAY [ <oSay> CAPTION ] <caption>4.3.3. @ <x>,<y> EDITBOX[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ TRANSPARENT ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
@ <x>,<y> EDITBOX [ <oEdit> CAPTION ] <caption>4.3.4. REDEFINE EDITBOX[ 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> ]
[ NOBORDER ]
[ PASSWORD ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
REDEFINE EDITBOX <oEdit>4.3.5. @ <x>,<y> BUTTON[ 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> ]
@ <x>,<y> BUTTON [ <oButton> CAPTION ] <caption>4.3.6. REDEFINE BUTTON[ 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> ]
REDEFINE BUTTON <oButton>4.3.7. @ <x>,<y> CHECKBOX[ OF <oWnd> ]
ID <nId>
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CLICK <bClick> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
@ <x>,<y> CHECKBOX [ <oCheck> CAPTION ] <caption>4.3.8. REDEFINE CHECKBOX[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ INIT <lInit> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CLICK <bClick> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
REDEFINE CHECKBOX <oCheck>4.3.9. @ <x>,<y> COMBOBOX[ OF <oWnd> ]
ID <nId>
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ INIT <lInit> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CLICK <bClick> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
@ <x>,<y> COMBOBOX [ <oCombo> ITEMS ] <aItems>4.3.10. REDEFINE COMBOBOX[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ INIT <nInit> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CHANGE <bChange> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
[ EDIT ]
[ TEXT ]
REDEFINE COMBOBOX [ <oCombo> ITEMS ] <aItems>4.3.11. @ <x>,<y> RADIOBUTTON[ OF <oWnd> ]
ID <nId>
[ INIT <nInit> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CHANGE <bChange> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
@ <x>,<y> RADIOBUTTON [ <oRadio> CAPTION ] <caption>4.3.12. REDEFINE RADIOBUTTON[ 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> ]
REDEFINE RADIOBUTTON <oRadio>4.3.13. RADIOGROUP[ OF <oWnd> ]
ID <nId>
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CLICK <bClick> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
RADIOGROUP4.3.14. END RADIOGROUP
END RADIOGROUP [ SELECTED <nSel> ]4.3.15. @ <x>,<y> PANEL
@ <x>,<y> PANEL <oPanel>4.3.16. REDEFINE PANEL[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ STYLE <nStyle> ]
REDEFINE PANEL <oCheck>4.3.17. @ <x>,<y> BROWSE[ OF <oWnd> ]
ID <nId>
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
@ <x>,<y> BROWSE <oBrowse>4.3.18. REDEFINE BROWSE[ 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> ]
[ APPEND ]
[ AUTOEDIT ]
[ ON UPDATE <bUpdate> ]
[ ON KEYDOWN <bKeyDown> ]
[ ON POSCHANGE <bPosChg> ]
REDEFINE BROWSE <oBrowse>4.3.19. ADD COLUMN ADD COLUMN <block> <[ 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> ]
TO <oBrowse>4.3.20. @ <x>,<y> OWNERBUTTON
[ HEADER <cTitle> ]
[ TYPE <type> ]
[ LENGTH <length> ]
[ DEC <dec> ]
[ <lEdit: EDITABLE> ]
[ JUSTIFY HEAD <nJusHead> ]
[ JUSTIFY LINE <nJusLine> ]
[ PICTURE <cPict> ]
[ VALID <bValid> ]
[ WHEN <bWhen> ]
[ ITEMS <aItem> ]
[ BITMAP >oBmp> ]
@ <x>,<y> OWNERBUTTON <oOwnBtn>4.3.21. REDEFINE OWNERBUTTON[ 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> ]
]
REDEFINE OWNERBUTTON <oOwnBtn>4.3.22. @ <x>,<y> GROUPBOX[ 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> ]
]
@ <x>,<y> GROUPBOX [ <oGroup> CAPTION ] <caption>4.3.23. @ <x>,<y> DATEPICKER[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
@ <x>,<y> DATEPICKER [ <oPicker> CAPTION ] <caption>4.3.24. @ <x>,<y> UPDOWN[ 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> ]
@ <x>,<y> UPDOWN [ <oUpDown> INIT ] <nInit>4.3.25. @ <x>,<y> TAB @ <x>,<y> TAB [ <oTab> ITEMS ] <aTabs>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> ]
[ OF <oWnd> ]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> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CHANGE <bChange> ]
[ BITMAP <aBmp> [ FROM RESOURCE] [ BITCOUNT <nBC> ] ]
[ OF <oWnd> ]4.3.29. INSERT NODE INSERT NODE [ <oNode> TITLE ] <cTitle>
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ FONT <oFont> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ STYLE <nStyle> ]
[ EDITABLE ]
[ BITMAP <aBmp> [ FROM RESOURCE ] ]
TO <oTree>4.3.30. SET TIMER SET TIMER [ <oTimer> ]
[ AFTER <oPrev> ]
[ BEFORE <oNext> ]
[ BITMAP <aBmp> ]
[ ON CLICK <bClick> ]
[ OF <oWnd> ]4.3.31. @ <x>,<y> BITMAP @ <x>,<y> BITMAP [ <oBmp> SHOW ] <bitmap>
[ ID <id> ]
VALUE <value>
ACTION <bAction>
[<res: FROM RESOURCE> ]4.3.32. @ <x>,<y> REDEFINE BITMAP REDEFINE BITMAP [ <oBmp> SHOW ] <bitmap>
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ TOOLTIP <ctoolt> ]
[ OF <oWnd> ]4.3.33. @ <x>,<y> ICON @ <x>,<y> ICON [ <oBmp> SHOW ] <icon>
[ ID <nId> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ TOOLTIP <ctoolt> ]
[<res: FROM RESOURCE> ]4.3.34. @ <x>,<y> REDEFINE ICON REDEFINE ICON [ <oBmp> SHOW ] <icon>
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ TOOLTIP <ctoolt> ]
[ OF <oWnd> ]4.3.35. @ <x>,<y> IMAGE @ <x>,<y> IMAGE [ <oBmp> SHOW ] <image>
ID <nId>
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ TOOLTIP <ctoolt> ]
[ OF <oWnd> ]4.3.36. @ <x>,<y> REDEFINE IMAGE REDEFINE IMAGE [ <oBmp> SHOW ] <image>
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ TOOLTIP <ctoolt> ]
[ OF <oWnd> ]4.3.37. @ <x>,<y> LINE @ <x>,<y> LINE [ <oLine> ]
ID <nId>
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ TOOLTIP <ctoolt> ]
[ LENGTH <length> ]4.3.38. @ <x>,<y> RICHEDIT @ <x>,<y> RICHEDIT [ <oEdit> TEXT ] <vari>
[ OF <oWnd> ]
[ ID <nId> ]
[ VERTICAL]
[ ON SIZE <bSize> ]
[ OF <oWnd> ]4.3.39. @ <x>,<y> SPLITTER @ <x>,<y> SPLITTER [ <oSplit> ]
[ 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> ]
[ OF <oWnd> ]4.3.40. @ <x>,<y> GRAPH @ <x>,<y> GRAPH [ <oGraph> DATA ] <aData>
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bPaint> ]
[ DIVIDE <aLeft> FROM <aRight> ]
[ OF <oWnd> ]4.3.41. @ <x>,<y> PROGRESSBAR @ <x>,<y> PROGRESSBAR <oPBar>
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON SIZE <bSize> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
[ OF <oWnd> ]4.3.42. @ <x>,<y> MONTHCALENDAR @ <x>,<y> MONTHCALENDAR [ <oCalendar> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ BARWIDTH <maxpos> ]
[ QUANTITY <nRange> ]
[ OF <oWnd> ]4.3.43. @ <x>,<y> LISTBOX @ <x>,<y> LISTBOX [ <oList> ITEMS ] <aItems>
[ ID <nId> ]
[ INIT <dInit> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON CHANGE <bChange> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
[ NOTODAY ]
[ NOTODAYCIRCLE ]
[ WEEKNUMBERS ]
[ OF <oWnd> ]4.3.44. @ <x>,<y> REDEFINE LISTBOX REDEFINE LISTBOX [ <oList> ITEMS ] <aItems>
[ ID <nId> ]
[ INIT <dInit> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bPaint> ]
[ ON CHANGE <bChange> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
[ OF <oWnd> ]4.3.45. SPLASH SPLASH [ <oPBar> TO ] <oBitmap>
ID <nId>
[ INIT <dInit> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bPaint> ]
[ ON CHANGE <bChange> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
[ FROM RESOURCE ]4.3.46. @ <x>,<y> TRACKBAR @ <x>,<y> TRACKBAR [ <oTrack> ]
[ TIME <otime> ]
[ OF <oWnd> ]4.3.47. @ <x>,<y> ANIMATION @ <x>,<y> ANIMATION [ <oAnimation> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ RANGE <nLow>, <nHigh> ]
[ INIT <dInit> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bPaint> ]
[ ON CHANGE <bChange> ]
[ ON DRAG <bDrag> ]
[ STYLE <nStyle> ]
[ TOOLTIP <ctoolt> ]
[ VERTICAL ]
[ AUTOTICKS ]
[ NOTICKS ]
[ BOTH ]
[ TOP ]
[ LEFT ]
[ OF <oWnd> ]
[ ID <nId> ]
[ STYLE <nStyle> ]
[ SIZE <width>, <height> ]
[ FILE <cFile> ]
[ AUTOPLAY ]
[ CENTER ]
[ TRANSPARENT ]
Get system doesn't use a special class, something like HGet. It uses the same control classes ( HEdit, HCheckButton, etc. ), as usual control creating commands, only add there some new behavour.
4.4.1. @ <x>,<y> GET@ <x>,<y> GET [ <oEdit> VAR ] <vari>4.4.2. REDEFINE GET[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ PICTURE <cPicture> ]
[ WHEN <bWhen> ]
[ VALID <bValid> ]
[ NOBORDER ]
[ PASSWORD ]
[ MAXLENGTH <lMaxLength> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
REDEFINE GET [ <oEdit> VAR ] <vari>4.4.3. @ <x>,<y> GET CHECKBOX[ OF <oWnd> ]
ID <nId>
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ WHEN <bWhen> ]
[ VALID <bValid> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
@ <x>,<y> GET CHECKBOX [ <oEdit> VAR ] <vari>4.4.4. REDEFINE GET CHECKBOX[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ VALID,ON CLICK <bValid> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
REDEFINE GET CHECKBOX [ <oEdit> VAR ] <vari>4.4.5. @ <x>,<y> GET COMBOBOX[ OF <oWnd>]
ID <nId>
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ VALID,ON CLICK <bValid> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
@ <x>,<y> GET COMBOBOX [ <oCombo> VAR ] <vari>4.4.6. REDEFINE GET COMBOBOXITEMS ] <aItems>
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON CHANGE <bChange> ]
[ WHEN <bWhen> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ EDIT ]
[ TEXT ]
[ TOOLTIP <ctoolt> ]
REDEFINE GET COMBOBOX [ <oCombo> VAR ] <vari>4.4.7. GET RADIOGROUPITEMS ] <aItems>
[ OF <oWnd> ]
ID <nId>
[ ON CHANGE <bChange> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
GET RADIOGROUP [ <ogr> VAR ] <vari>4.4.8. @ <x>,<y> GET DATEPICKER
@ <x>,<y> GET DATEPICKER [ <oPick> VAR ] <vari>4.4.9. @ <x>,<y> GET UPDOWN[ OF <oWnd>]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ WHEN <bWhen> ]
[ VALID <bValid> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
@ <x>,<y> GET UPDOWN[ <oUpDown> VAR ] <vari>4.4.10. SET KEYRANGE <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> ]
SET KEY <nctrl>, <nkey> [ OF <oDlg> ] [ TO <func> ]
INIT PRINTER <oPrinter>4.5.2. INIT DEFAULT PRINTER[ NAME <cPrinter> ]
[ PIXEL ]
INIT DEFAULT PRINTER <oPrinter>[ PIXEL ]
The following schema illustrates the hierarchy of classes, currently implemented in HwGUI.
It is a base class for all HwGUI classes.
Do not create instances of HCustomWindow. It serves as a base class for windows, dialogs and controls classes. Variables and methods of HCustomWindow provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.
DATACLASS VAR oDefaultParent SHARED
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
HelpId
nHolder
METHODSAddControl( oCtrl )
DelControl( oCtrl )
AddEvent( nEvent,nId,bAction )
FindControl( nId )
Hide()
Show()
Move( x1,y1,width,height )
onEvent( msg, wParam, lParam )
End()
DATACLASS VAR aWindows
CLASS VAR szAppName
menu, oPopup, hAccel
oIcon, oBmp
lUpdated
lClipper
GetList
KeyList
nLastKey
aOffset
lMaximize
METHODSNew( oIcon,clr,nStyle,x,y,width,height,cTitle,cMenu,nPos,oFont,
bInit,bExit,bSize,bPaint,bGfocus,bLfocus,bOther,cAppName,oBmp,lMaximize,cHelp,nHelpId )
AddItem( oWnd )
DelItem( oWnd )
FindWindow( hWnd )
GetMain()
Center()
Restore()
Maximize()
Minimize()
Close()
DATACLASS VAR aMessages
nMenuPos
oNotifyIcon, bNotify, oNotifyMenu
lTray
METHODSNew( lType,oIcon,clr,nStyle,x,y,width,height,cTitle,cMenu,nPos,
oFont,bInit,bExit,bSize,bPaint,bGfocus,bLfocus,bOther,
cAppName,oBmp,lMaximize,cHelp,nHelpId )
Activate( lShow )
onEvent( msg, wParam, lParam )
InitTray( oNotifyIcon, bNotify, oNotifyMenu )
GetMdiActive()
DATACLASS VAR aMessages
METHODSActivate( lShow )
onEvent( msg, wParam, lParam )
METHODSNew( oIcon,clr,nStyle,x,y,width,height,cTitle,cMenu,oFont,
bInit,bExit,bSize,bPaint,bGfocus,bLfocus,bOther,
cAppName,oBmp,lMaximize,cHelp,nHelpId )
Activate( lShow )
onEvent( msg, wParam, lParam )
DATACLASS VAR aDialogs
CLASS VAR aModalDialogs
menu
oPopup
lResult
lUpdated // TRUE, if any GET is changed
lClipper // Set it to TRUE for moving between GETs with ENTER key
GetList
KeyList
nLastKey
oIcon, oBmp
lExitOnEnter
bActivate
lActivated
xResourceID
METHODSNew( lType,nStyle,x,y,width,height,cTitle,bInit,bExit,bSize,
bPaint,bGfocus,bLfocus,bOther,lClipper,oBmp,oIcon,lExitOnEnter,nHelpId,xResourceID )
Activate(lNoModal)
onEvent( msg, wParam, lParam )
AddItem( oWnd,lModal )
DelItem( oWnd,lModal )
FindDialog( hWnd )
GetActive()
Center()
Restore()
Maximize()
Minimize()
Close()
DATAid
tooltip
lInit
METHODSNew( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,oFont,bInit,
bSize,bPaint,ctoolt,tcolor,bcolor )
Init()
SetColor( tcolor,bcolor,lRepaint )
NewId()
Disable()
Enable()
IsEnabled()
SetFocus()
GetText()
SetText( c )
End()
DATA
winclass active lChanged lDispHead Should I display headers ? lDispSep Should I display separators ? aColumns HColumn's array rowCount Number of visible data rows rowPos Current row position rowCurrCount Current number of rows colPos Current column position nColumns Number of visible data columns nLeftCol Leftmost column xpos freeze Number of columns to freeze kolz Number of records in browse tekzp,msrec recCurr headColor Header text color sepColor Separators color lSep3d varbuf tcolorSel,bcolorSel,brushSel bSkip,bGoTo,bGoTop,bGoBot,bEof,bBof bRcou,bRecno bPosChanged, bLineOut, bScrollPos bEnter, bKeyDown, bUpdate internal alias Alias name of browsed database x1,y1,x2,y2,width,height minHeight lEditable lAppable lAppMode lAutoEdit lUpdated lAppended lAdjRight Adjust last column to right nHeadRows Rows in header nFootRows Rows in footer
METHODSNew( lType,oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,oFont ;
bInit,bSize,bPaint,bEnter,bGfocus,bLfocus,lNoVScroll,lNoBorder,
lAppend,lAutoedit,bUpdate,bKeyDown,bPosChg ) InitBrw( nType )
Rebuild()
Activate()
onEvent( msg, wParam, lParam )
Redefine( lType,oWnd,nId,bInit,bSize,bDraw,bEnter,bGfocus,bLfocus )
FindBrowse( nId )
AddColumn( oColumn )
InsColumn( oColumn,nPos )
DelColumn( nPos )
Paint()
LineOut()
HeaderOut( hDC )
FooterOut( hDC )
SetColumn( nCol )
DoHScroll( wParam )
DoVScroll( wParam )
LineDown()
LineUp()
PageUp()
PageDown()
Bottom()
Top()
ButtonDown( lParam )
ButtonUp( lParam )
ButtonDbl( lParam )
MouseMove( wParam, lParam )
MouseWheel( nKeys, nDelta, nXPos, nYPos )
Edit( wParam,lParam )
Append()
RefreshLine()
Refresh()
ShowSizes()
End()
DATAwinclass
METHODSNew( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,
bInit,bSize,bPaint,lDocked )
Activate()
onEvent( msg, wParam, lParam )
Redefine( oWnd,nId,nHeight,bInit,bSize,bPaint )
Paint()
End()
DATAwinclass
lFlat
state
bClick
lPress
text,tfont,xt,yt,widtht,heightt
bitmap,xb,yb,widthb,heightb,lTransp,oBitmap
lEnabled
METHODSNew( 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,lEnabled )
Activate()
onEvent( msg, wParam, lParam )
Init()
Redefine( oWndParent,nId,bInit,bSize,bPaint,bClick,lflat,
cText,color,font,xt,yt,widtht,heightt,
bmp,lResour,xb,yb,widthb,heightb,lTr,
cTooltip,lEnabled ) Paint()
MouseMove( wParam, lParam )
MDown()
MUp()
Press()
Release()
End()
DATAwinclass
aLeft
aRight
lVertical
hCursor
lCaptured, lMoved
bEndDrag
METHODSNew( oWndParent,nId,nLeft,nTop,nWidth,nHeight,
bSize,bPaint,color,bcolor,aLeft,aRight )
Activate()
onEvent( msg, wParam, lParam )
Init()
Paint( lpdis )
Drag( lParam )
DragAll()
DATACLASS VAR winclass
aParts
METHODSNew( oWndParent,nId,nStyle,aParts,bInit,bSize,bPaint )
Activate()
Init()
DATACLASS VAR winclass
METHODSNew( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont,bInit,bSize,bPaint,ctoolt,tcolor,bcolor,lTransp )
Activate()
Redefine( oWndParent,nId,oFont,bInit, ;
bSize,bPaint,ctoolt,tcolor,bcolor,lTransp )
SetValue(value)
Init()
DATACLASS VAR winclass
METHODSNew( 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 )
Init()
DATACLASS VAR winclass
lMultiLine
cType
bSetGet
bValid
cPicFunc, cPicMask
lPicComplex
lFirst
lChanged
lMaxLength
METHODSNew( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight,oFont,
bInit,bSize,bPaint,bGfocus,bLfocus,ctoolt,tcolor,bcolor,cPicture,lNoBorder,lMaxLength )
Activate()
onEvent( msg, wParam, lParam )
Redefine( oWnd,nId,vari,bSetGet,oFont,bInit,bSize,bDraw,bGfocus,bLfocus,ctoolt,tcolor,bcolor,cPicture )
Init()
SetGet(value) INLINE Eval( ::bSetGet,value )
Refresh()
SetText(c)
DATACLASS VAR winclass
bSetGet
value
METHODSNew( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont,
bInit,bSize,bPaint,bClick,ctoolt,tcolor,bcolor,bGFocus )
Activate()
Redefine( oWnd,nId,vari,bSetGet,oFont,bInit,bSize,bDraw,bClick,ctoolt,tcolor,bcolor,bGFocus )
Init()
Refresh()
Disable()
Enable()
DATACLASS VAR winclass
CLASS VAR oGroup
METHODSNew( 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 )
DATACLASS VAR winclass
aItems
bSetGet
value
bChangeSel
lText
lEdit
METHODSNew( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight,aItems,
bInit,bSize,bPaint,bChange,cTooltip,lEdit,lText,bGFocus,tcolor,bcolor )
Activate()
Redefine( oWnd,nId,vari,bSetGet,aItems,bInit,bSize,bPaint,bChange,cTooltip,bGFocus )
Init( aCombo, nCurrent )
Refresh()
Setitem( nPos )
DATACLASS VAR winclass
METHODSNew( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont,
bInit,bSize,bPaint,tcolor,bcolor )
Activate()
DATACLASS VAR winclass
lVert
oPenLight, oPenGray
METHODSNew( oWndParent,nId,lVert,nLeft,nTop,nLength,bSize )
Activate()
Paint()
DATACLASS VAR winclass
oImage
METHODSNew( oWndParent,nId,nLeft,nTop,nWidth,nHeight,bInit,
bSize,ctoolt )
Activate() Redefine( oWndParent,nId,bInit,bSize,ctoolt )
End()
METHODSNew( oWndParent,nId,nLeft,nTop,nWidth,nHeight,Image,lRes,bInit,
bSize,ctoolt )
Redefine( oWndParent,nId,Image,lRes,bInit,bSize,ctoolt )
Init()
ReplaceBitmap( Image, lRes )
METHODSNew( oWndParent,nId,nLeft,nTop,nWidth,nHeight,Image,lRes,bInit,
bSize,ctoolt )
Redefine( oWndParent,nId,Image,lRes,bInit,bSize,ctoolt )
Init()
METHODSNew( oWndParent,nId,nLeft,nTop,nWidth,nHeight,Image,lRes,bInit,
bSize,ctoolt )
Redefine( oWndParent,nId,Image,lRes,bInit,bSize,ctoolt )
Paint()
DATACLASS VAR winclass
bSetGet
value
bChange
METHODSNew( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight, ;
oFont,bInit,bGfocus,bLfocus,ctoolt,tcolor,bcolor )
Activate()
Init()
Refresh()
DATACLASS VAR winclass
bSetGet
value
hUpDown, idUpDown, styleUpDown
nLower
nUpper
nUpDownWidth
lChanged
METHODSNew( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight, ;
oFont,bInit,bSize,bPaint,bGfocus,bLfocus,ctoolt,tcolor,bcolor,nUpDWidth,nLower,nUpper )
Activate()
Init()
Refresh()
DATACLASS VAR winclass
aTabs
aPages
bChange,bChange2
hIml, aImages, Image1, Image2
oTemp
bAction
METHODSNew( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight, ;
oFont,bInit,bSize,bPaint,aTabs,bChange,,aImages,lResour,nBC,bClick, bGetFocus, bLostFocus )
Activate()
Init()
SetTab( n )
StartPage( cname )
EndPage()
ChangePage( nPage )
HidePage( nPage )
ShowPage( nPage )
GetActivePage( nFirst,nEnd )
DATACLASS VAR winclass
aItems
oSelected
himl,aImages,Image1,Image2
bItemChange, bExpand, bRClick, bAction
lEmpty
METHODSNew( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,oFont,
bInit,bSize,color,bcolor,aImages,lResour,lEditLabels,bAction,nBC )
Activate()
Init()
AddNode( cTitle, oPrev, oNext, bAction, aImages )
FindChild( handle )
GetSelected()
EditLabel( oNode )
Expand( oNode )
Select( oNode )
Clean()
End()
DATACLASS VAR winclass
value
bChange
METHODSNew( oWndParent, nId, vari, nStyle, nLeft, nTop, nWidth, nHeight,
oFont, bInit, bChange, cTooltip, lNoToday, lNoTodayCircle, lWeekNumbers )
Activate()
Init()
SetValue( dValue )
GetValue()
DATACLASS VAR winclass
aItems
bSetGet
value
bChangeSel
METHODSNew( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight,aItems,oFont,
bInit,bSize,bPaint,bChange,cTooltip )
Activate()
Redefine( oWnd,nId,vari,bSetGet,aItems,oFont,bInit,bSize,bDraw,bChange,cTooltip )
Init( aListbox, nCurrent )
Refresh()
Setitem( nPos )
DATACLASS VAR winclass
value
bChange
bThumbDrag
nLow
nHigh
hCursor
METHODSNew( oWndParent,nId,vari,nStyle,nLeft,nTop,nWidth,nHeight,
bInit,bSize,bPaint,cTooltip,bChange,bDrag,nLow,nHigh,lVertical,TickStyle,TickMarks )
Activate()
onEvent( msg, wParam, lParam )
Init()
SetValue( nValue )
GetValue()
DATACLASS VAR winclass
cFileName
METHODSNew( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight,
cFilename, lAutoPlay, lCenter, lTransparent )
Activate()
Init()
Open( cFileName )
Play( nFrom, nTo, nRep )
Seek( nFrame )
Stop()
Close()
Destroy()
DATAblock,heading,width,type,length,dec,cargo
nJusHead, nJusLin
tcolor,bcolor,brush
lEditable
aList
aBitmaps
bValid,bWhen
bEdit
cGrid
lSpandHead
lSpandFoot
Picture
METHODSNew( cHeading,block,type,length,dec,lEditable,nJusHead,nJusLin,,cPict,bValid,bWhen,aItem,oBmp )
DATACLASS VAR oGroupCurrent
aButtons
value
bSetGet
METHODSNew( vari,bSetGet )
EndGroup( nSelected )
SetValue( nValue )
Refresh()
DATACLASS VAR aFonts
handle
name, width, height ,weight
charset, italic, Underline, StrikeOut
nCounter
METHODSAdd( fontName, nWidth, nHeight ,fnWeight, fdwCharSet, ;
fdwItalic, fdwUnderline, fdwStrikeOut, nHandle )
Select()
Release()
DATACLASS VAR aPens
handle
style, width, color
nCounter
METHODSAdd( style, width, color )
Release()
DATACLASS VAR aBrushes
handle
color
nHatch
nCounter
METHODSAdd( color,nHatch )
Release()
DATACLASS VAR aBitmaps
handle
name
nWidth, nHeight
nCounter
METHODSAddResource( name )
AddFile( name,hDC )
AddWindow( oWnd,lFull )
Release()
DATACLASS VAR aIcons
handle
name
nCounter
METHODSAddResource( name )
AddFile( name,hDC )
Release()
DATAhDCPrn
hDC
cPrinterName
hPrinter
aMeta
lPreview
cMetaName
nWidth, nHeight
nPWidth, nPHeight
nHRes, nVRes
lmm
nCurrPage, oTrackV, oTrackH
nZoom, xOffset, yOffset, x1, y1, x2, y2
METHODS
New( cPrinter,lmm ) Opening a printer. If 'cPrinter' is omitted, Printer Setup dialog appears; if 'cPrinter' is an empty string, default printer is used. SetMode( nOrientation ) AddFont( fontName, nHeight ,lBold, lItalic, lUnderline ) SetFont( oFont ) StartDoc( lPreview,cMetaName ) Starts printing of a document. lPreview should be TRUE, if you want to preview the printing result. EndDoc() End of a document printing. StartPage() EndPage() ReleaseMeta() PlayMeta( nPage, oWnd, x1, y1, x2, y2 ) PrintMeta( nPage ) Preview( cTitle,aBitmaps,aTooltips,aBtnUser ) Opening of a preview window, this should be used after EndDoc() call. End() Releasing the printer. 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 )
DATACLASS VAR winclass
aItems
handle
oTree, oParent
bAction
cargo
METHODSNew( oTree, oParent, oPrev, oNext, cTitle, bAction,aImages )
AddNode( cTitle, oPrev, oNext, bAction, aImages )
Delete()
FindChild( handle )
GetText()
SetText(cText)
DATACLASS VAR aTimers
id
value
oParent
bAction
METHODSNew( oParent,id,value,bAction )
End()
This class is similar to HBitmap, HIcon classes, it allows to load, save and draw an image in BMP, JPEG, PNG and some other formats. It uses FreeImage library (http://freeimage.sourceforge.net>) - so, if you include it in your application, you need to have FreeImage.dll.
DATACLASS VAR aImages
handle
hBitmap
name
nWidth, nHeight
nCounter
METHODSThe example of using this class you may find in samples/viewer/viewer.prg.
AddFile( name ) Load the image from a file FromBitmap( oBitmap ) Create an image from a bitmap Draw( hDC,nLeft,nTop,nWidth,nHeight ) Draw the image on specified device contect Release() Unload the image
METHODSCreate( cFile,oTime,oResource )
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 !
@ <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:
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.
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 )
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:
HwGUI is released under the same license, as Harbour itself.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this software; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
As a special exception, you have permission for additional uses of the text contained in its release of HWGUI.
The exception is that, if you link the HWGUI library with other files to produce an executable, this does not by itself cause the resulting executable to be covered by the GNU General Public License. Your use of that executable is in no way restricted on account of linking the HWGUI library code into it.