You are on page 1of 41

Alexander Kresin Rus Eng

software
HwGUI 2.21 reference manual
prev Alexander S.Kresin, October 2018 next

6. Classes
6.1. Introduction
This section describes all of the classes that make up the
HwGUI. In the description of the classes I omitted some variables
that are used only for the internal needs of the class methods.
Redefine() methods also omitted as outdated and not
recommended for use.
Variables, marked as (RW), may be set and read, (R) - read
only, those, which are not marked, shouldn't be used in programs.

6.2. Class hierarchy


The following schema illustrates the hierarchy of classes,
currently implemented in HwGUI.

• HObject
o HScrollArea (WinAPI version only)
o HCustomWindow
▪ HWindow
▪ HMainWindow
▪ HMDIChildWindow (WinAPI version only)
▪ HDialog
▪ HControl
▪ HBrowse
▪ HPanel
▪ HPanelSts
▪ HPanelHea
▪ HOwnButton
▪ HSplitter
▪ HStatus
▪ HStatic
▪ HStaticLink
▪ HButton
▪ HEdit
▪ HChecBox
▪ HRadioButton
▪ HCombobox
▪ HGroup
▪ HLine
▪ HSayImage
▪ HSayBmp
▪ HSayIcon
▪ HSayFImage (WinAPI version only)
▪ HDatePicker (WinAPI version only)
▪ HUpDown
▪ HTab
▪ HTree
▪ HMonthCalendar
▪ HListbox (WinAPI version only)
▪ HTrackBar (WinAPI version only)
▪ HAnimation (WinAPI version only)
▪ HGrid (WinAPI version only)
▪ HToolBar
▪ HGraph
▪ HPager (WinAPI version only)
▪ HRebar (WinAPI version only)
▪ HCEdit
o HColumn
o HRadioGroup
o HFont
o HPen
o HBrush
o HBitmap
o HIcon
o HPrinter
o HTreeNode
o HTimer
o HFreeImage (WinAPI version only)
o HSplash (WinAPI version only)
o HPrintDos (WinAPI version only)
o HWinPrn
o HFormTmpl
o HRepTmpl
o HBinC
o HStyle
o HilightBase
▪ Hilight
o HXMLNode
▪ HXMLDoc

HObject
It is a base class for all HwGUI classes.

DATA
objName (RW) a name of an
object to identify it in user programs
cargo (RW) a variable, which
you may use as you need
HScrollArea
It is a base class for windows (HWindow), currently it is
implemented in WinAPI version only.

HCustomWindow
Do not create instances of HCustomWindow. It serves as a base
class for all windows and controls. In other words, HCustomWindow
provide basic variables and methods, which are inherited by all
windows and controls. Every subclass adds its own variables and
methods, modifies inherited, if needed, and use others as is.

DATA
CLASS VAR oDefaultParent
title (RW) a title/caption
of a window or a control
nTop, nLeft (RW) coordinates of a
top left corner
nWidth, nHeight (RW) a size: width and
height
tcolor, bcolor (RW) text and
background color, respectively,
oFont (RW) a font, an object
of HFont class
bInit (RW) codeblock,
performed during initialization
bDestroy (RW) codeblock,
performed during destroying
bSize (RW) codeblock,
performed when a size is changed
bPaint (RW) codeblock, which
paints the element
bGetFocus (RW) codeblock,
executed when it receives focus
bLostFocus (RW) codeblock,
executed when it looses focus
bOther (RW) codeblock,
executed for all messages

handle (R) handle of a GUI


element
oParent (R) an object of a
parent window or control
type (R)
brush (R)
style (R) WinAPI style
extstyle (R) extended WinAPI
style
lHide (R) .T., if the
element is hidden
aControls (R) an array with
controls objects, belonged to this
window or
container
aEvents, aNotify
HelpId
nHolder

METHODS
AddControl( oCtrl )
DelControl( oCtrl )
AddEvent( nEvent,nId,bAction,lNotify )
FindControl( nId,nHandle )
Hide()
Show()
Move( x1,y1,width,height )
SetColor( tcolor, bColor, lRepaint )
Internal:
onEvent( msg, wParam, lParam )
End()

HWindow
It is a base class for all windows and dialogs, do not create
instances of it.

DATA
CLASS VAR aWindows (R)
CLASS VAR szAppName (R)
CLASS VAR aKeysGlobal (R)
lUpdated (RW) .F., if any of
GET items is changed
lClipper (RW)
oBmp (RW)
bCloseQuery (RW)
bActivate (RW) codeblock,
performed one time while window activation
tColorinFocus (RW) text color for an
Edit control, which has focus
bColorinFocus (RW) background color
for an Edit control, which has focus
bScroll (RW) codeblock,
performed during window scrolling
menu (R)
oIcon (R)
GetList (R)
KeyList (R)
nLastKey (R)
aOffset
oEmbedded
oPopup, hAccel

METHODS
New( oIcon, clr, nStyle, x, y, width, height,
cTitle, cMenu, nPos,
oFont, bInit, bExit, bSize, bPaint,
bGfocus, bLfocus, bOther,
cAppName, oBmp, cHelp, nHelpId, bColor )
FindWindow( hWnd ) - Seeking a window
by the handle, returns a window object
GetMain() - returns a main
window object
Center() - moves the window
in the center of the screen
Restore() - restores the
normal window size
Maximize() - expands window
to full screen
Minimize() - minimizes window
SetTitle( cTitle ) - set a new window
title
Close() - closes windows,
deletes it with all controls
Internal:
AddItem( oWnd )
DelItem( oWnd )

HMainWindow
A class of a main window. the corresponding command: INIT
WINDOW MAIN

DATA
CLASS VAR aMessages
nMenuPos
oNotifyIcon, bNotify, oNotifyMenu
lTray

METHODS
New( lType, oIcon, clr, nStyle, x, y, width,
height, cTitle, cMenu, nPos,
oFont, bInit, bExit, bSize, bPaint,
bGfocus, bLfocus, bOther,
cAppName, oBmp, cHelp, nHelpId, bColor,
nExclude )
Activate( lShow, lMaximized, -
Activates a window, the corresponding
lMinimized, lCentered, bActivate )
command: ACTIVATE WINDOW
InitTray( oNotifyIcon, bNotify, oNotifyMenu )
GetMdiActive() -
returns an active MDI child window object
Internal:
onEvent( msg, wParam, lParam )

HMDIChildWindow
A class of a MDI child window. the corresponding command:
INIT WINDOW MDICHILD

DATA
CLASS VAR aMessages

METHODS
New( oIcon, clr, nStyle, x, y, width, height,
cTitle, cMenu, oFont,
bInit, bExit, bSize, bPaint, bGfocus,
bLfocus, bOther,
cAppName, oBmp, cHelp, nHelpId, bColor )
Activate( lShow, lMaximized, lMinimized,
lCentered, bActivate )
Internal:
onEvent( msg, wParam, lParam )

HDialog
DATA
CLASS VAR aDialogs (R)
CLASS VAR aModalDialogs (R)
lResult (RW)
lClipper (RW) IF .T., ENTER
allows to move between GET items
lExitOnEnter (RW)
lExitOnEsc (RW)
lClosable (R)
lModal
nInitState

METHODS
New( lType, nStyle, x, y, width, height,
cTitle, bInit, bExit, bSize,
bPaint, bGfocus, bLfocus, bOther, lClipper,
oBmp, oIcon, lExitOnEnter, nHelpId,
xResourceID, lExitOnEsc, bColor,
lNoClosable )
Activate( lNoModal, lMaximized, lMinimized,
lCentered, bActivate )
FindDialog( hWnd )
GetActive() - returns a GET element object
of this dialog, which owns input focus
Close()
Internal:
AddItem()
DelItem()
onEvent( msg, wParam, lParam )

HControl
DATA
Anchor (RW) a numeric value,
which determines autoresizing
of a control due
to a parent window resizing
tooltip (R)
id (R)
lInit

METHODS
New(
oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,oFon
t,bInit,
bSize,bPaint,ctoolt,tcolor,bcolor )
Disable()
Enable()
Enabled()
SetFocus()
GetText()
SetText( c )
Refresh() - virtual method
Internal:
Init()
NewId()
End()

HBrowse
DATA
active (RW)
lChanged (RW)
lDispHead (RW) Should I display
headers ?
lDispSep (RW) Should I display
separators ?
lBuffering (RW)
freeze (RW) Number of columns
to freeze
aArray (RW) An array to
browse
oStyleHead (RW) A HStyle object
to draw the header
oStyleFoot (RW) A HStyle object
to draw the footer
oStyleCell (RW) A HStyle object
to draw the cell
headColor (RW) Header text color
sepColor (RW) Separators color
aPadding (RW)
aHeadPadding (RW)
lInFocus (RW)
tcolorSel, bcolorSel (RW) Text and
backgound color of a selected row
httColor, htbColor (RW) Text and
backgound color of a selected cell
bSkip, bGoTo, bGoTop (RW)
bGoBot, bEof, bBof (RW)
bRcou, bRecno, bRecnoLog(RW)
bPosChanged, bLineOut, (RW)
bScrollPos, bHScrollPos (RW)
bEnter (RW)
bKeyDown (RW)
bUpdate (RW)
bRClick (RW)
lEditable (RW)
lAppable (RW)
lAppMode (RW)
lAutoEdit (RW)
lAdjRight (RW) Adjust last
column to right
winclass (R)
aColumns (R) HColumn's array
nRecords (R) Number of records
in browse
nCurrent (R) Number of a
current record in a browse
nRowHeight (R) Predefined height
of a row
nRowTextHeight (R) A max text height
in a row
rowCount (R) Number of visible
data rows
rowPos (R) Current row
position
rowCurrCount (R) Current number of
rows
colPos (R) Current column
position
nColumns (R) Number of visible
data columns
nLeftCol (R) Leftmost column
nHeadRows (R) Rows in header
nFootRows (R) Rows in footer
recCurr (R)
lUpdated (R)
lAppended (R)
oPenSep, oPenHdr, oPen3d (R)
brushSel (R)
lSep3d (R)
aSelected (R)
nPaintRow, nPaintCol (R) Row/Col being
painted
alias (R) Alias name of
browsed database
x1,y1,x2,y2 (R)
width,height (R)
aColAlias
aRelation
lResizing
lCtrlPress

METHODS
New( lType, oWndParent, nId, nStyle, nLeft,
nTop, nWidth, nHeight, oFont ;
bInit, bSize, bPaint, bEnter, bGfocus,
bLfocus, lNoVScroll, lNoBorder,
lAppend, lAutoedit, bUpdate, bKeyDown,
bPosChg, lMultiSelect, bRClick )
InitBrw( nType )
Rebuild()
AddColumn( oColumn )
InsColumn( oColumn,nPos )
DelColumn( nPos )
SetColumn( nCol )
LineDown( lMouse )
LineUp()
PageUp()
PageDown()
Bottom()
Top()
Home()
RefreshLine()
Refresh()
ShowSizes()
Internal:
Activate()
Paint()
DrawHeader( hDC, nColumn, x1, y1, x2, y2 )
LineOut()
HeaderOut( hDC )
FooterOut( hDC )
DoHScroll( wParam )
DoVScroll( wParam )
ButtonDown( lParam )
ButtonRDown( lParam )
ButtonUp( lParam )
ButtonDbl( lParam )
MouseMove( wParam, lParam )
MouseWheel( nKeys, nDelta, nXPos, nYPos )
Edit( wParam,lParam )
Append()
onEvent( msg, wParam, lParam )
End()

HPanel
DATA
bScroll (RW)
oStyle (RW)
lDragWin (RW)
winclass (R)
oEmbedded (R)
aPaintCB Array of items to
draw
lCaptured
hCursor

METHODS
New( oWndParent, nId, nStyle, nLeft, nTop,
nWidth, nHeight,
bInit, bSize, bPaint, bColor, oStyle )
Hide()
Show()
BackColor( bcolor )
SetPaintCB( nId, block, cId )
Internal:
Activate()
onEvent( msg, wParam, lParam )
DrawItems( hDC, aCoors )
Paint()
Drag( xPos, yPos )
Release()

HPanelSts
DATA
aParts (R)
aText (R)

METHODS
New( oWndParent, nId, nHeight, oFont, bInit,
bPaint, bcolor, oStyle, aParts )
Write( cText, nPart, lRedraw )
SetText( cText )
Internal:
PaintText( hDC )
Paint()

HPanelHea
DATA
xt, yt (RW)
lMaximized

METHODS
New( oWndParent, nId, nHeight, oFont, bInit,
bPaint, tcolor, bcolor, oStyle, ;
cText, xt, yt, lBtnClose, lBtnMax, lBtnMin )
SetText( c )
SetSysbtnColor( tColor, bColor )
Internal:
PaintText( hDC )
Paint()

HOwnButton
DATA
CLASS VAR cPath SHARED
lFlat (RW)
aStyle (RW)
bClick (RW)
lCheck (RW)
text (RW)
tfont (RW)
xt, yt, widtht, heightt (RW)
oBitmap (RW)
xb, yb, widthb, heightb (RW)
lTransp, trColor (RW)
winclass (R)
lEnabled (R)
nOrder (R)
state (R)
lPress (R)

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,
trColor,
cTooltip, lEnabled, lCheck, bColor )
Press()
Release()
Internal:
Activate()
onEvent( msg, wParam, lParam )
Init()
Paint()
DrawItems( hDC )
MouseMove( wParam, lParam )
MDown()
MUp()
End()
Enable()
Disable()

HSplitter
DATA
aLeft (RW)
aRight (RW)
lVertical (RW)
oStyle (RW)
lRepaint (RW)
nFrom, nTo (RW)
bEndDrag (RW)
winclass (R)
hCursor
lCaptured, lMoved

METHODS
New( oWndParent, nId, nLeft, nTop, nWidth,
nHeight,
bSize, bPaint, color, bcolor, aLeft,
aRight, nFrom, nTo, oStyle )
Internal:
Activate()
onEvent( msg, wParam, lParam )
Init()
Paint( lpdis )
Drag( lParam )
DragAll()
HStatus
DATA
CLASS VAR winclass (R)
aParts (R)

METHODS
New( oWndParent, nId, nStyle, aParts, bInit,
bSize, bPaint )
SetText( cText,nPart )
Internal:
Activate()
Init()

HStatic
DATA
CLASS VAR winclass (R)
nStyleDraw (R)

METHODS
New( oWndParent, nId, nStyle, nLeft, nTop,
nWidth, nHeight, cCaption, oFont,
bInit, bSize, bPaint, ctoolt, tcolor,
bcolor, lTransp )
Internal:
Activate()
Init()
Paint( lpDis )

HStaticLink
DATA
m_bFireChild (RW)
m_hHyperCursor (RW)
m_bMouseOver (RW)
m_bVisited (RW)
m_oTextFont (RW)
m_csUrl (RW)
m_sHoverColor (RW)
m_sLinkColor (RW)
m_sVisitedColor (RW)
state (R)
dwFlags

METHODS
New( oWndParent, nId, nStyle, nLeft, nTop,
nWidth, nHeight, cCaption, oFont, bInit,
bSize, bPaint, ctooltip, tcolor, bcolor,
lTransp, cLink, vColor, lColor, hColor )
SetLinkUrl( csUrl )
GetLinkUrl()
SetVisitedColor( sVisitedColor )
SetHoverColor( cHoverColor )
SetFireChild( lFlag )
SetLinkColor( sLinkColor )
Internal:
Activate()
Init()
onEvent( msg, wParam, lParam )
GoToLinkUrl( csLink )
OnClicked()
Paint()
OnMouseMove( nFlags, point )

HButton
DATA
bClick (RW)
CLASS VAR winclass (R)

METHODS
New( oWndParent, nId, nStyle, nLeft, nTop,
nWidth, nHeight, cCaption, oFont,
bInit, bSize, bPaint, bClick, ctoolt,
tcolor, bcolor )
Internal:
Activate()
Init()

HEdit
DATA
CLASS VAR winclass (R)
bSetGet (RW)
bValid (RW)
lNoPaste (RW)
nMaxLength (RW)
bkeydown (RW)
bkeyup (RW)
bchange (RW)
bColorBlock (RW)
cPicFunc, cPicMask (R)
lPicComplex (R)
lFirst (R)
lChanged (R)
lMultiLine (R)
cType (R)
aColorOld

METHODS
New( oWndParent, nId, vari, bSetGet, nStyle,
nLeft, nTop, nWidth, nHeight, ;
oFont, bInit, bSize, bGfocus, bLfocus,
ctooltip, ;
tcolor, bcolor, cPicture, lNoBorder,
nMaxLength, lPassword, bKeyDown, bChange )
Refresh()
Value( xValue ) SETGET
SelStart( nStart ) SETGET
SelLength( nLength ) SETGET
Internal:
Activate()
onEvent( msg, wParam, lParam )
Init()
ParsePict( cPicture, vari )

HCheckButton
DATA
CLASS VAR winclass (R)
bSetGet (RW)
bClick (RW)
lValue

METHODS
New( oWndParent, nId, vari, bSetGet,nStyle,
nLeft, nTop, nWidth, nHeight,
cCaption, oFont, bInit, bSize, bPaint,
bClick, ctoolt, tcolor, bcolor,
bGFocus, lTransp, bLFocus )
Refresh()
Disable()
Enable()
Value( lValue ) SETGET
Internal:
Activate()
Init()

HRadioButton
DATA
CLASS VAR winclass (R)
bClick (RW)
oGroup

METHODS
New( oWndParent, nId, nStyle, nLeft, nTop,
nWidth, nHeight, cCaption, oFont,
bInit, bSize, bPaint, bClick, ctoolt,
tcolor, bcolor, lTransp )
Value( lValue ) SETGET
Internal:
Activate()

HCombobox
DATA
CLASS VAR winclass (R)
bSetGet (RW)
bValid (RW)
bChangeSel (RW)
aItems (R)
lText (R)
lEdit (R)
nDisplay (R)
xValue

METHODS
New( oWndParent, nId, vari, bSetGet, nStyle,
nLeft, nTop, nWidth, nHeight, aItems,
bInit, bSize, bPaint, bChange, cTooltip,
lEdit, lText, bGFocus, tcolor,
bcolor, bValid, nDisplay )
Refresh( xVal )
Setitem( nPos )
GetValue( nItem )
Value ( xValue ) SETGET
Internal:
Activate()
Init( aCombo, nCurrent )

HGroup
DATA
CLASS VAR winclass (R)

METHODS
New( oWndParent, nId, nStyle, nLeft, nTop,
nWidth, nHeight, cCaption, oFont,
bInit, bSize, bPaint, tcolor, bcolor )
Internal:
Activate()
HLine
DATA
CLASS VAR winclass (R)
lVert (R)
oPenLight, oPenGray (R)

METHODS
New( oWndParent, nId, lVert, nLeft, nTop,
nLength, bSize )
Internal:
Activate()
Paint()

HSayImage
Do not create instances of HSayImage. It serves as a base class
for HSayBmp, HSayIcon, HSayFimage

DATA
CLASS VAR winclass (R)
oImage (RW)
bClick, bDblClick (RW)

METHODS
New( oWndParent, nId, nLeft, nTop, nWidth,
nHeight, bInit,
bSize, ctoolt, bClick, bDblClick )
Internal:
Activate()
End()
onClick()
onDblClick()

HSayBmp
DATA
lTransp (RW) Is the image
transparent, .F. by default
trcolor (RW) The transparent
color value
nStretch (RW)
nBorder (RW) A border width in
pixels, 0 by default
oPen (R)
nOffsetV
nOffsetH
nZoom

METHODS
New( oWndParent, nId, nLeft, nTop, nWidth,
nHeight, Image, lRes, bInit,
bSize, ctoolt, bClick, bDblClick, lTransp,
nStretch, trcolor )
ReplaceBitmap( Image, lRes )
Refresh()
Internal:
Paint( lpdis )

HSayIcon
METHODS
New( oWndParent, nId, nLeft, nTop, nWidth,
nHeight, Image, lRes, bInit,
bSize, ctoolt, lOEM, bClick, bDblClick )
Internal:
Refresh()
Init()

HSayFImage
DATA
nOffsetV
nOffsetH
nZoom

METHODS
New( oWndParent, nId, nLeft, nTop, nWidth,
nHeight, Image, lRes, bInit,
bSize, ctoolt, cType )
ReplaceImage( Image, cType )
Refresh()
Internal:
Paint( lpdis )

HDatePicker
DATA
CLASS VAR winclass (R)
bSetGet (RW)
bChange (RW)
value

METHODS
New( oWndParent, nId, vari, bSetGet, nStyle,
nLeft, nTop, nWidth, nHeight,
oFont, bInit, bGfocus, bLfocus, ctoolt,
tcolor, bcolor )
Refresh()
Value ( dValue ) SETGET
Internal:
Activate()
Init()

HUpDown
DATA
CLASS VAR winclass (R)
bSetGet (RW)
nLower (RW)
nUpper (RW)
nValue (R)
nUpDownWidth (R)
hUpDown, idUpDown, styleUpDown
lChanged

METHODS
New( oWndParent, nId, vari,bSetGet, nStyle,
nLeft, nTop, nWidth, nHeight,
oFont, bInit, bSize, bPaint, bGfocus,
bLfocus, ctoolt, tcolor, bcolor,
nUpDWidth, nLower, nUpper )
Refresh()
Value( nValue ) SETGET
SetRange( n1, n2 )
Hide()
Show()
Internal:
Activate()
Init()

HTab
DATA
CLASS VAR winclass (R)
bChange,bChange2 (RW)
bAction (RW)
aTabs (R)
aPages (R)
hIml, aImages, Image1, Image2
oTemp

METHODS
New( oWndParent, nId, nStyle, nLeft, nTop,
nWidth, nHeight, oFont, bInit,
bSize, bPaint, aTabs, bChange, aImages,
lResour, nBC, bClick, bGetFocus,
bLostFocus )
GetActivePage( nFirst,nEnd )
SetTab( n )
Internal:
Activate()
Init()
onEvent( msg, wParam, lParam )
StartPage( cname )
EndPage()
ChangePage( nPage )
DeletePage( nPage )
HidePage( nPage )
ShowPage( nPage )
Notify( lParam )

HTree
DATA
CLASS VAR winclass (R)
aItems (R)
oSelected (R)
bItemChange (RW)
bExpand (RW)
bRClick (RW)
bDblClick (RW)
bAction (RW)
himl,aImages,Image1,Image2
lEmpty

METHODS
New( oWndParent, nId, nStyle, nLeft, nTop,
nWidth, nHeight, oFont,
bInit, bSize, color, bcolor, aImages,
lResour, lEditLabels, bAction, nBC )
AddNode( cTitle, oPrev, oNext, bAction,
aImages )
FindChild( handle )
GetSelected()
EditLabel( oNode )
Select( oNode )
Expand( oNode )
Clean()
Internal:
Activate()
Init()
Notify( lParam )
End()

HMonthCalendar
DATA
CLASS VAR winclass (R)
bChange (RW)
dValue

METHODS
New( oWndParent, nId, vari, nStyle, nLeft,
nTop, nWidth, nHeight,
oFont, bInit, bChange, cTooltip, lNoToday,
lNoTodayCircle, lWeekNumbers )
Value( dValue ) SETGET
Internal:
Activate()
Init()

HListbox
DATA
CLASS VAR winclass
aItems
bSetGet
value
bChangeSel
bkeydown, bDblclick
bValid

METHODS
New( oWndParent, nId, vari, bSetGet, nStyle,
nLeft, nTop, nWidth, nHeight,
aItems, oFont, bInit, bSize, bPaint,
bChange, cTooltip, tColor, bcolor,
bGFocus, bLFocus, bKeydown, bDblclick,
bOther )
Activate()
Init( aListbox, nCurrent )
Refresh()
Requery()
Setitem( nPos )
AddItems( p )
DeleteItem( nPos )
Valid( oCtrl )
When( oCtrl )
onChange( oCtrl )
onDblClick()
Clear()
onEvent( msg, wParam, lParam )

HTrackBar
DATA
CLASS VAR winclass (R)
bChange (RW)
bThumbDrag (RW)
nLow (RW)
nHigh (RW)
nValue (R)
hCursor

METHODS
New( oWndParent, nId, vari, nStyle, nLeft,
nTop, nWidth, nHeight, bInit,
bSize, bPaint, cTooltip, bChange, bDrag,
nLow, nHigh, lVertical,
TickStyle, TickMarks )
Value( nValue ) SETGET
GetNumTics()
Internal:
Activate()
onEvent( msg, wParam, lParam )
Init()

HAnimation
DATA
CLASS VAR winclass (R)
cFileName (RW)
xResID

METHODS
New( oWndParent, nId, nStyle, nLeft, nTop,
nWidth, nHeight,
cFilename, lAutoPlay, lCenter,
lTransparent, xResID )
Open( cFileName )
Play( nFrom, nTo, nRep )
Seek( nFrame )
Stop()
Close()
Destroy()
Internal:
Activate()
Init()
HGrid
DATA
CLASS VAR winclass
aBitMaps
ItemCount
color
bkcolor
aColumns
nRow
nCol

lNoScroll
lNoBorder
lNoLines
lNoHeader

bEnter
bKeyDown
bPosChg
bDispInfo

bGfocus
bLfocus

METHODS
New( oWnd, nId, nStyle, x, y, width, height,
oFont, bInit, bSize, bPaint, bEnter,
bGfocus, bLfocus, lNoScroll, lNoBord,
bKeyDown, bPosChg, bDispInfo,
nItemCount, lNoLines, color, bkcolor,
lNoHeader, aBit )
Activate()
Init()
AddColumn( cHeader, nWidth, nJusHead, nBit )
Refresh()
RefreshLine()
SetItemCount( nItem )
Row()
Notify( lParam )

HToolBar
DATA
Name
id
nBitIp
bState
bStyle
tooltip
aMenu
hMenu
Title
bClick
oParent

METHODS
New( oParent, cName, nBitIp, nId, bState,
bStyle, cText, bClick, ctip, aMenu )
Enable()
Disable()
Show()
Hide()
Enabled( lEnabled ) SETGET
Checked( lCheck ) SETGET
Pressed( lPressed ) SETGET
onClick()
Caption( cText ) SETGET

HGraph
DATA
aValues (RW)
nType (RW)
aSignX, aSignY (RW)
nGraphs (RW)
lGridX (RW)
lGridY (RW)
lGridXMid (RW)
lPositive (RW)
x1Def (RW)
x2Def (RW)
y1Def (RW)
y2Def (RW)
ymaxSet (RW)
colorCoor (RW)
aColors (RW)
aPens (R)
scaleX, scaleY (R)
tbrush (R)
oPen, oPenCoor (R)

METHODS
New( oWndParent, nId, aValues, nLeft, nTop,
nWidth, nHeight, oFont,
bSize, ctooltip, tcolor, bcolor )
Rebuild( aValues )
Internal:
Activate()
Init()
CalcMinMax()
Paint()

HPager
DATA
CLASS DATA oSelected INIT Nil
winclass
TEXT, id, nTop, nLeft, nwidth, nheight
ExStyle
bClick
lVert
hTool
m_nWidth, m_nHeight

METHODS
New( oWndParent, nId, nStyle, nLeft, nTop,
nWidth, nHeight, cCaption, oFont,
bInit, bSize, bPaint, ctooltip, tcolor,
bcolor, lVert )
SetScrollArea( nWidth, nHeight )
Activate()
Init()
Notify( lParam )
Pagersetchild( b )
Pagerrecalcsize()
Pagerforwardmouse( b )
Pagersetbkcolor( b )
Pagergetbkcolor()
Pagersetborder( b )
Pagergetborder()
Pagersetpos( b )
Pagergetpos()
Pagersetbuttonsize( b )
Pagergetbuttonsize()
Pagergetbuttonstate()

HRebar
DATA
CLASS DATA oSelected
winclass
TEXT, id, nTop, nLeft, nwidth, nheight
ExStyle
bClick
lVert
hTool
m_nWidth, m_nHeight
aBands

METHODS
New( oWndParent, nId, nStyle, nLeft, nTop,
nWidth, nHeight, cCaption,
oFont, bInit, bSize, bPaint, ctooltip,
tcolor, bcolor, lVert )
Activate()
Init()
ADDBARColor( pBar, clrFore, clrBack, pszText,
dwStyle )
Addbarbitmap( pBar, pszText, pbmp, dwStyle )
RebarBandNew( pBar, pszText, clrFore, clrBack,
pbmp, dwStyle )
CreateBands( pBar, pszText, clrFore, clrBack,
pbmp, dwStyle )

HCEdit
DATA
CLASS VAR winclass (R)
nMaxLines (RW)
cp, cpSource (RW)
lUtf8 (RW)
nDocFormat (RW)
nDocOrient (RW)
aDocMargins (RW)

lShowNumbers (RW)
lReadOnly (RW)
lInsert (RW)
lNoPaste (RW)

nBoundL (RW)
nBoundR (RW)
nBoundT (RW)
nMarginL (RW)
nMarginR (RW)
nMarginT (RW)
nMarginB (RW)

n4Number (RW)
n4Separ (RW)
bColorCur (RW)
tcolorSel (RW)
bcolorSel (RW)
nClrDesk (RW)
nAlign (RW)
nIndent (RW)
bChangePos, bKeyDown (RW)
bClickDoub (RW)
bAfter (RW)
nTabLen (RW)
lStripSpaces (RW)
nMaxUndo (RW)
oHili (RW)

hEdit (R)
cFileName (R)
aText, nTextLen (R)
aWrap, nLinesAll (R)
nKoeffScr (R)
lUpdated (R)
nShiftL (R)
nDefFont (R)
nLineF (R)
nPosF (R)
aLines, nLines (R)
nLineC, nPosC (R)
nWCharF (R)
nWSublF (R)
aFonts (R)
aFontsPrn (R)
oPenNum (R)
nCaret (R)
lChgCaret (R)
lSetFocus (R)
lMDown (R)
aPointC (R)
aPointM1, aPointM2 (R)
lVScroll (R)
nClientWidth (R)
nDocWidth (R)
aUndo (R)

METHODS
New( oWndParent, nId, nStyle, nLeft, nTop,
nWidth, nHeight, oFont,
bInit, bSize, bPaint, tcolor, bcolor,
bGfocus, bLfocus, lNoVScroll, lNoBorder )
Open( cFileName, cPageIn, cPageOut )
SetHili( xGroup, oFont, tColor, bColor )
SetText( xText, cPageIn, cPageOut )
SAVE( cFileName )
AddFont( oFont, name, width, height , weight,
CharSet, Italic, Underline, StrikeOut )
SetFont( oFont )
SetCaretPos( nType, p1, p2 )
PutChar( nKeyCode )
LineDown()
LineUp()
PageDown()
PageUp()
Top()
Bottom()
GOTO( nLine )
PCopy( Psource, Pdest )
PCmp( P1, P2 )
GetText( P1, P2 )
InsText( aPoint, cText, lOver, lChgPos )
DelText( P1, P2, lChgPos )
AddLine( nLine )
DelLine( nLine )
Refresh()
SetWrap( lWrap, lInit )
SetPadding( nValue )
SetBorder( nThick, nColor )
Highlighter( oHili )
Internal:
Activate()
Init()
onEvent( msg, wParam, lParam )
Paint( lReal )
PaintLine( hDC, yPos, nLine, lUse_aWrap )
MarkLine( nLine, lReal, nSubLine )
End()
Convert( cPageIn, cPageOut )
onKeyDown( nKeyCode, lParam, nCtrl )
onVScroll( wParam )
Scan()
Undo( nLine1, nPos1, nLine2, nPos2, nOper,
cText )
Print( nDocFormat, nDocOrient, nMarginL,
nMarginR, nMarginT, nMarginB )
PrintLine( oPrinter, yPos, nL )

HColumn
DATA
block (RW)
heading (RW) Header text
string
footing (RW) Footer text
string
width (RW)
type (RW)
length (RW) column width in
characters (or in pixels, if the value is negative)
dec (RW)
nJusHead (RW) Header text
alignment (0-left, 1-center, 2-right)
nJusLin (RW) Cell text
alignment (0-left, 1-center, 2-right)
tcolor, bcolor (RW)
lEditable (RW) Is the column
editable
lResizable (RW) Is the column
resizable
aList (RW) Array of possible
values for a column -
combobox will be
used while editing the cell
oStyleHead (RW) An HStyle object
to draw the header
oStyleFoot (RW) An HStyle object
to draw the footer
oStyleCell (RW) An HStyle object
to draw the cell
aBitmaps (RW)
bValid,bWhen (RW)
bEdit (RW) Codeblock, which
performs cell editing, if defined
Picture (RW)
cGrid (RW)
lSpandHead (RW)
lSpandFoot (RW)
bHeadClick (RW) Codeblock, which
executes after a mouse click on a header
bColorBlock (RW)
brush (R)
aPaintCB (R) An array with
codeblocks to paint column items

METHODS
New( cHeading, block, type, length, dec,
lEditable, nJusHead, nJusLin,
cPict, bValid, bWhen, aItem, bColorBlock,
bHeadClick )
SetPaintCB( nId, block, cId )

HRadioGroup
DATA
CLASS VAR oGroupCurrent
bSetGet (RW)
aButtons (R)
nValue (R)
oHGroup (R)
METHODS
New( vari,bSetGet )
NewRg( oWndParent, nId, nStyle, vari, bSetGet,
nLeft, nTop, nWidth, nHeight,
cCaption, oFont, bInit, bSize, tcolor,
bColor )
EndGroup( nSelected )
Value( nValue ) SETGET
Refresh()

HFont
DATA
CLASS VAR aFonts (R)
handle (R)
name, width (R)
height ,weight (R)
charset, italic (R)
Underline, StrikeOut (R)
nCounter

METHODS
Add( fontName, nWidth, nHeight ,fnWeight,
fdwCharSet, fdwItalic,
fdwUnderline, fdwStrikeOut, nHandle )
Select( oFont )
SetFontStyle( lBold, nCharSet, lItalic,
lUnder, lStrike, nHeight )
Release()

HPen
DATA
CLASS VAR aPens (R)
handle (R)
style, width, color (R)
nCounter

METHODS
Add( style, width, color )
Get( nStyle,nWidth,nColor )
Release()

HBrush
DATA
CLASS VAR aBrushes (R)
handle (R)
color (R)
nHatch (R)
nCounter

METHODS
Add( color,nHatch )
Release()

HBitmap
DATA
CLASS VAR cPath SHARED (RW)
CLASS VAR lSelFile (RW)
CLASS VAR aBitmaps (R)
handle (R)
name (R)
nFlags (R)
nWidth, nHeight (R)
nCounter

METHODS
AddResource( name, nFlags, lOEM, nWidth,
nHeight )
AddStandard( nId )
AddFile( name, hDC, lTranparent, nWidth,
nHeight )
AddString( name, cVal )
AddWindow( oWnd, x1, y1, width, height ) -
Creates a bitmap from a given window.
Draw( hDC, x1, y1, width, height )
Release()

HIcon
DATA
CLASS VAR cPath SHARED (RW)
CLASS VAR lSelFile (RW)
CLASS VAR aIcons (R)
handle (R)
name (R)
nWidth, nHeight (R)
nCounter

METHODS
AddResource( name, nWidth, nHeight, nFlags,
lOEM )
AddFile( name, nWidth, nHeight )
Draw( hDC, x, y )
Release()
HPrinter
DATA
CLASS VAR aPaper (R)
hDCPrn (R)
hDC (R)
cPrinterName (R)
hPrinter (R)
lPreview (R)
cMetaName (R)
nWidth, nHeight (R)
nPWidth, nPHeight (R)
nHRes, nVRes (R)
nOrient (R)
lmm (R)
nPage (R)

lBuffPrn (R)
lUseMeta (R)
aPages, aJob (R)
aFonts (R)
aPens, aBitmaps (R)
oFont, oPen (R)
cScriptFile (R)

nCurrPage
oTrackV, oTrackH
nZoom, xOffset, yOffset
x1, y1, x2, y2

FormType (R)
BinNumber (R)
Copies (R)
PaperLength (R)
PaperWidth (R)
TopMargin (RW)
BottomMargin (RW)
LeftMargin (RW)
RightMargin (RW)

METHODS
New( cPrinter, lmm, nFormType, nBin,
lLandScape, nCopies, lProprierties, hDCPrn )
SetMode( nOrientation, nDuplex )
AddFont( fontName, nHeight ,lBold, lItalic,
lUnderline, nCharset )
SetFont( oFont )
StartDoc( lPreview,cMetaName ) - Starts
printing of a document.
EndDoc() - End of a document
printing.
StartPage()
EndPage()
LoadScript( cScriptFile )
SaveScript( cScriptFile )
ReleaseMeta()
PaintDoc( oWnd )
PrintDoc( nPage )
PrintDlg()
PrintScript( hDC, nPage, x1, y1, x2, y2 )
Preview( cTitle, aBitmaps, aTooltips,
aBootUser )
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 )
GetTextWidth( cString, oFont )

HTreeNode
DATA
CLASS VAR winclass (R)
aItems (R)
handle (R)
oTree, oParent (R)
bAction (RW)

METHODS
New( oTree, oParent, oPrev, oNext, cTitle,
bAction,aImages )
AddNode( cTitle, oPrev, oNext, bAction,
aImages )
Delete()
FindChild( handle )
GetText()
SetText(cText)

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

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

DATA
CLASS VAR aImages (R)
handle (R)
hBitmap (R)
name (R)
nWidth, nHeight (R)
nCounter

METHODS
AddFile( name ) - Load the image
from a file
AddFromVar( cImage,cType )
FromBitmap( oBitmap ) - Create an image
from a bitmap
Draw( hDC, nLeft, nTop, nWidth, nHeight )
Release() - Unload the image

The example of using this class you may find in


samples/viewer/viewer.prg.
HSplash
METHODS
Create( cFile,oTime,oResource )

HPrintDos
DATA
cCompr, cNormal, oText, cDouble, cBold,
cUnBold
oPorta, oPicture
orow, oCol
cEject, nProw, nPcol, fText, gText
oTopMar
oLeftMar
oAns2Oem
LastError
oPrintStyle
colorPreview
nStartPage
nEndPage
nCopy

METHODS
New( oPorta )
Say( oProw, oCol, oTexto, oPicture )
SetCols( nRow, nCol )
gWrite( oText )
NewLine()
Eject()
Compress()
Double()
DesCompress()
Bold()
UnBold()
Comando()
SetPrc( x, y )
PrinterFile( oFile )
TxttoGraphic( oFile, osize, oPreview )
Preview( fname, cTitle )
END()

HWinPrn
DATA
CLASS VAR nStdHeight SHARED (R)
CLASS VAR cPrinterName SHARED (R)
oPrinter (R)
nFormType (R)
oFont (R)
nLineHeight, nLined (R)
nCharW (R)
x, y (R)
cPseudo (R)
lElite (R)
lCond (R)
nLineInch (R)
lBold (R)
lItalic (R)
lUnder (R)
nLineMax (R)
lChanged (R)

cpFrom, cpTo (R)


nTop (R)
nBottom (R)
nLeft (R)
nRight (R)

METHODS
New( cPrinter, cpFrom, cpTo, nFormType )
InitValues( lElite, lCond, nLineInch, lBold,
lItalic, lUnder, nLineMax )
SetMode( lElite, lCond, nLineInch, lBold,
lItalic, lUnder, nLineMax )
StartDoc( lPreview,cMetaName )
NextPage()
PrintLine( cLine,lNewLine )
PrintText( cText )
PutCode( cText )
EndDoc()
End()

HFormTmpl
DATA
CLASS VAR aForms (R)
CLASS VAR maxId (R)
CLASS VAR oActive (R)
cFormName (R)
oDlg (R)
aControls (R)
aProp (R)
aMethods (R)
aVars (R)
aNames (R)
pVars (R)
aFuncs (R)
id (R)
cId (R)
nContainer (R)
nCtrlId (R)
lDebug (R)
lNoModal (R)
bDlgExit, bFormExit (R)
cargo (RW)

METHODS
Read( fname, cId )
Show( nMode, params )
ShowMain( params )
ShowModal( params )
Close()
F( id, n )
Find( cId )
HRepTmpl
DATA
CLASS VAR aReports (R)
CLASS VAR maxId (R)
CLASS VAR aFontTable (R)
cFormName (R)
aControls (R)
aProp (R)
aMethods (R)
aVars (R)
aFuncs (R)
lDebug (R)
id (R)
cId (R)

nKoefX, nKoefY, nKoefPix


nTOffset, nAOffSet, ny
lNextPage, lFinish
oPrinter

METHODS
READ( fname, cId )
PRINT( printer, lPreview, p1, p2, p3, p4, p5 )
PrintAsPage( printer, nPageType, lPreview, p1,
p2, p3, p4, p5 )
PrintItem( oItem )
ReleaseObj( aControls )
Find( cId )
CLOSE()

HBinC
This class implements a binary container - an one-file repository
for different files, which you need to use in your program - an
images, for example. It gets rid off directories with icons, images
and other supplementary files, which are included in the distribution
of your application, replacing them all with one file.
The binary container may serve as a cross-platform alternative
for a resources file. GTK doesn't support Windows-like resources
(*.rc, *.res). Using a binary container, we are able to write a code,
which works identically in both versions, especially there are means
in HwGUI to use operations with a binary container as a substitute
for operations with resources. If you call hwg_SetResContainer(
cName ) function, files will be retrieved from this container instead of
resources:
hwg_SetResContainer( cPath + "myapp.bin" )
...
// The bitmap will retrieve from myapp.bin
oBitmap := HBitmap():AddResource( "open" )
...
// and here, too!
@ x, y OWNERBUTTON OF oToolBar ON CLICK
{||Test()} ;
SIZE 32, 32 BITMAP "TEST" FROM RESOURCE

There is a special HwGUI utility for creating the binary container


and filling it with files. It is placed in hwgui/utils/bincnt - Binary
container manager.

DATA
cName (RW) the name of a
file of a binary container;
lWriteAble (RW) opening mode (.T.
- it is writeable);
handle (R) a handle of a
file of a binary container;
nVerHigh, nVerLow (R) a version of a
binary container;
nItems (R) a number of
elements in a container;
nCntLen (R) a length of a
table of contents of a file in bytes;
nCntBlocks (R) a number of
blocks in a table of contents;
nPassLen (R) a password
length;
nFileLen (R) a file length;
aObjects (R) an array of
elements.

METHODS
Create( cName, n ) - creates a file
of a binary container;
Open( cName, lWr ) - opens a file of
a binary container;
Close() - closes a file of
a binary container;
Add( cObjName, cType, cVal )- adds an element
to a container;
Del( cObjName, cType ) - removes an
element from a container;
Pack() - packs the
container;
Exist( cObjName ) - checks, if the
element exisis in a container;
Get( cObjName ) - retrieves an
element from a container.

HStyle
This class defines a style, painting parameters of a rectangular
area, in particular - of some widget. It is possible to define a
bacground color, an array of colors - in this case a gradient will be
drawn. A direction of a gradient, a thickness and color of a border
(if needed) may be specified in HStyle object. You can set a bitmap
instead of background colors - it will fill the backgroung (look at
hwg_SpreadBitmap() function). The corners may be drawn rounded,
each corner - with a specified radius.
You may create at first an HStyle object with the help of
HStyle():New(), and the to use it for different controls. Look for the
samples of using HStyle in the Tutorial, chapter "Advanced using of
controls".

DATA
CLASS VAR aStyles (R) an array with all
defined styles, it is filled
automatically;
id (R) a style id, it is
created automatically;
nOrient (R) a gradient
direction (look at hwg_DrawGradient());
aColors (R) an array of
background colors, if few are defined, a
gradient is
drawn;
oBitmap (R) an object of
HBitmap class - a bitmap to fill background;
nBorder (R) a thickness of a
border in pixels. If it is absent,
the border will
not be drawn;
tColor (R) a color of a
border;
oPen (R) an object of HPen
class, it is created automatically;
aCorners (R) an array with
corners radiuses (look at
hwg_DrawGradient()).

METHODS
New( aColors, nOrient, aCorners, nBorder,
tColor, oBitmap )
Draw( hDC, nTop, nLeft, nWidth, nHeight )
HilightBase
Do not create instances of HilightBase. It serves as a base class
for other syntax hilighting classes.

DATA
oEdit (R)
lCase (R)
aLineStru, nItems, nLine (R)

METHODS
New()
End()
Do()

Hilight
Syntax hilighting class, it is intended to be used together with
an editor class HCEdit.

DATA
cCommands (RW) A list of
keywords (commands), divided by space
cFuncs (RW) A list of
keywords (functions), divided by space
cScomm (RW) A string, which
starts single line comments
cMcomm1, cMcomm2 (RW) Start and end
strings for multiline comments

lMultiComm (RW)
aDop, nDopChecked (R)

METHODS
New( cFile, cSection )
Set( oEdit )
Do( nLine, lCheck )
UpdSource( nLine )
AddItem( nPos1, nPos2, nType )

HXMLNode
DATA
CLASS VAR nLastErr SHARED (R)
title (R)
type (R)
aItems (R)
aAttr (R)
cargo (RW)

METHODS
New( cTitle, type, aAttr )
Add( xItem )
GetAttribute( cName, cType, xDefault )
SetAttribute( cName,cValue )
DelAttribute( cName )
Save( handle,level )
Find( cTitle,nStart )

HXMLDoc
DATA

METHODS
New( encoding )
Read( fname )
ReadString( buffer )
Save( fname,lNoHeader )
Save2String()

prev table of contents next


functions qhtm integration

Site map
© Copyright 2016. All Rights Reserved.
<div><img src="https://mc.yandex.ru/watch/37824975" style="position:absolute; left:-
9999px;" alt="" /></div>

You might also like